-->
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.  [ 3 posts ] 
Author Message
 Post subject: Intermittent errors , on load,operating on closed connection
PostPosted: Fri Nov 18, 2005 8:00 am 
Newbie

Joined: Fri Nov 18, 2005 7:39 am
Posts: 2
Location: India
Hi,
I get the follwoing different types of errors "intermittently" with Hibernate version 3,mysql 3.23 on linux fedora 2.

1.org.hibernate.exception.GenericJDBCException: could not load an entity: [com.harmot.school.University#stanford]
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1359)
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:116)
etc.

2.Caused by: java.sql.SQLException: You can't operate on a closed connection!!!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:68)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:198)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:396)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:334)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162)
at org.hibernate.loader.Loader.doQuery(Loader.java:390)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1345)
... 47 more
Caused by: java.lang.NullPointerException
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:173)
... 54 more


3. Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1902)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2348)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2858)
...** END NESTED EXCEPTION **



Last packet sent to the server was 1 ms ago.
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2560)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2858)



Interestingly ,the app was working fine earlier.We split the database into 2 with different cfg files and seperate sessionFactory objects. But that does not seem to be a logical cause.
Any help would be highly appreciated.

Thanks
Ajay

_________________
http://www.textbookgenie.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 8:19 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
The cause of the error seems more like a network error between the app and database than anything else. Or the MySQL driver is a bit iffy, is it a late version?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 11:13 am 
Newbie

Joined: Fri Nov 18, 2005 7:39 am
Posts: 2
Location: India
I am using mysql-connector-java-3.1.10-bin.jar and mysql 3.23.58 .

_________________
http://www.textbookgenie.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.