Home Running grails app fails on PSQLException: This ResultSet is closed
Reply: 0

Running grails app fails on PSQLException: This ResultSet is closed

neliCZka
1#
neliCZka Published in 2017-11-28 12:39:13Z

I am trying to run local grails app in terminal (well, in Pycharm) and it fails with this:

    [WARN] 2017-11-28 13:16:26,836 (springframework.jdbc.datasource.LazyConnectionDataSourceProxy:warn:189) | Could not retrieve default auto-commit and transaction isolation settings
org.postgresql.util.PSQLException: This ResultSet is closed.
        at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkClosed(AbstractJdbc2ResultSet.java:2852)
        at org.postgresql.jdbc2.AbstractJdbc2ResultSet.setFetchSize(AbstractJdbc2ResultSet.java:1875)
        at org.postgresql.jdbc4.Jdbc4Statement.createResultSet(Jdbc4Statement.java:37)
        at org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler.handleResultRows(AbstractJdbc2Statement.java:219)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1816)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.execSQLUpdate(AbstractJdbc2Connection.java:376)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.getTransactionIsolation(AbstractJdbc2Connection.java:898)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:233)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1214)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:676)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:455)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
        at org.eclipse.jetty.server.Server.doStart(Server.java:261)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
        at org.grails.jetty.JettyServer.startServer(JettyServer.groovy:134)
        at org.grails.jetty.JettyServer.start(JettyServer.groovy:99)
        at _GrailsRun$_run_closure1.doCall(_GrailsRun.groovy:60)
        at RunApp$_run_closure1.doCall(RunApp.groovy:33)
[WARN] 2017-11-28 13:16:27,152 (engine.jdbc.internal.JdbcServicesImpl:configure:195) | HHH000341: Could not obtain connection metadata : This ResultSet is closed.
[WARN] 2017-11-28 13:16:27,165 (grails.commons.spring.GrailsWebApplicationContext:warn:189) | Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:233)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1214)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:676)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:455)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
        at org.eclipse.jetty.server.Server.doStart(Server.java:261)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
        at org.grails.jetty.JettyServer.startServer(JettyServer.groovy:134)
        at org.grails.jetty.JettyServer.start(JettyServer.groovy:99)
        at _GrailsRun$_run_closure1.doCall(_GrailsRun.groovy:60)
        at RunApp$_run_closure1.doCall(RunApp.groovy:33)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
        ... 13 more

I have postgres instance running in docker. Version of grails is 2.4.5. I have Mac OS. I am behind proxy.

The grails was compiled successfully before and also some tests passed.

Unfortunately I have no idea what could be wrong and what should I try. I have no clue what to look for. I will be very glad for any suggestion which direction to look for! Thanks! :)

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.327021 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO