-->
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: Help me! net.sf.hibernate.exception.GenericJDBCException
PostPosted: Tue Aug 22, 2006 10:00 pm 
Newbie

Joined: Wed Jul 05, 2006 11:24 pm
Posts: 8
Dear All,

I am using Hibernate2 and Java, MySQL for a project.

But now there will be " net.sf.hibernate.exception.GenericJDBCException:: Unable to perform find" sometimes.

060823.0954 [iZation.TP-Processor6] FATAL There is something wrong in CouponKeysImp: findByCoupon(wcwd01)
net.sf.hibernate.exception.GenericJDBCException: Unable to perform find

In the codes CouponKeysImp(String) is :

public CouponKey findByCoupon(String coupon) throws iZationException{
CouponKey this_couponKey = null;

try {
Session ss = getSession();

Criteria criteria = ss.createCriteria(CouponKey.class);

criteria.add(Expression.like("coupon", coupon));

Iterator<CouponKey> it = criteria.list().iterator();

if (it.hasNext())
this_couponKey = it.next();

return this_couponKey;
}
catch (Throwable e) {
logger.fatal("There is something wrong in CouponKeysImp: findByCoupon("+ coupon + ")");
e.printStackTrace();
throw new iZationException(e);
}
}

The exception is
Caused by: net.sf.hibernate.exception.GenericJDBCException: Unable to perform find
at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90)

Caused by: java.sql.SQLException: No operations allowed after connection closed.


Could anyone me to review the problem? It happens sometimes,maybe once one hour.

Thanks

happybaobao


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 23, 2006 1:04 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Something is closing your connection before you've finished getting data from it. Find it and kill it.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 23, 2006 4:20 am 
Beginner
Beginner

Joined: Thu Apr 20, 2006 3:44 am
Posts: 32
Put a simple log stmt, when you open a connection and when you close the connection, this way you shall be able to identify the root cause.

Sudhir


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.