Hi,
I'm at my wit's end here-- I updated my application to hibernate 3 and tested it with hsql and postgres. With hsql it works fine, no problems. However with Postgres some errors have started to show up:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main] -- caught unexpected Exception while executing posted task.
java.lang.NullPointerException
at org.postgresql.jdbc2.AbstractJdbc2Statement.close(AbstractJdbc2Statement.java:656)
at com.mchange.v1.db.sql.StatementUtils.attemptClose(StatementUtils.java:38)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1.run(GooGooStatementCache.java:246)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:354)
or another error:
Could not complete transaction
org.hibernate.exception.GenericJDBCException: could not initialize a collection: [org.gridlab.gridsphere.portlet.impl.SportletData.Attributes#2c9f7d9706c8d8df0106c8da49b90027]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
....
at java.lang.Thread.run(Thread.java:534)
Caused by: java.sql.SQLException: You can't operate on a closed connection!!!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:68)
... 70 more
Caused by: java.lang.NullPointerException
at org.postgresql.jdbc2.AbstractJdbc2Statement.close(AbstractJdbc2Statement.java:656)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.close(NewProxyPreparedStatement.java:1674)
Literally all I did was upgrade all hibernate 2 and co. jar files to hibernate 3. I find it strange that with hsql it all works but postgres now has problems accessing the database. Are there any possible flags that can be turned on either to solve the problem or to gain a better understanding why my app is now broken?
I just wish there was a hibernate.postgres.used=true flag or something...
Thanks, Jason
|