-->
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: Problem while fetching data
PostPosted: Mon Feb 22, 2010 12:44 am 
Newbie

Joined: Fri Feb 19, 2010 4:26 am
Posts: 8
Hi All,

Iam getting following exception while trying to fetch data.
Please help me to fix the issue ASAP...

com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after statement closed.

Here's the code FYR
------------------------
Connection connection=getSession().connection();
for(String content:contents){
String query="select max(execute_time) as tim,count(execute_flag),(SELECT COUNT(1) FROM "+content+"_content ) as sCount" +
" from "+content+"_content where execute_flag=1; ";
System.out.println("Query:"+query);
statement=connection.prepareStatement(query);
resultSet=statement.executeQuery();
logBean=new ServiceLogBean();
while(resultSet.next()){
if(resultSet.getString(1)!=null)
logBean.setLastExecuteTime(resultSet.getString(1).substring(0,resultSet.getString(1).length()-2));
logBean.setRecordsSent(resultSet.getInt(2));
logBean.setTotalRecords(resultSet.getInt(2));
logBean.setRecordsInQueue(resultSet.getInt(2)-resultSet.getInt(2));
logBean.setServiceName(content);
}
list.add(logBean);
}


Top
 Profile  
 
 Post subject: Re: Problem while fetching data
PostPosted: Mon Feb 22, 2010 8:42 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Wrong forum. This type of question should be asked on the "Hibernate Users" forums.
Also have a look on how to report an issue - https://www.hibernate.org/160.html. It's pretty hard to decrypt your problem from your post.


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.