-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: how can i debug postgres problem after updating to hib3?
PostPosted: Thu Oct 06, 2005 10:40 pm 
Beginner
Beginner

Joined: Sun May 02, 2004 8:04 am
Posts: 36
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:

Code:
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:
Code:
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 posible 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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 07, 2005 5:43 am 
Beginner
Beginner

Joined: Thu Jan 06, 2005 6:11 am
Posts: 32
Location: Magdeburg, Germany
activate logging in log4j.properties:

log4j.logger.org.hibernate=DEBUG

and post the results...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.