-->
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.  [ 4 posts ] 
Author Message
 Post subject: exception clearing maxRows/queryTimeout
PostPosted: Tue May 13, 2008 4:30 pm 
Newbie

Joined: Tue Dec 16, 2003 8:34 am
Posts: 15
hibernate 3.2.4.sp1.jar
java 1.5
IBM DB2 9
IBM DB2 JDBC Universal Driver Architecture, version: 3.3.54

I'm seeing a very infrequent Hibernate exception that cannot be reliably reproduced (at this time). The failure is both rare, and transient; it appears for only one Session.get(...) and then disappears.

At this point, I'm just looking for promising avenues to explore, as I'm trying to develop a method to reliably reproduce the failure. Any clues, pointers, general observations much appreciated. Here's the code, followed by the stack trace.

public LRMUser find(long userId_) {

LOG.debug("userId_: " + userId_);
try {
Session session = MLHibernateStore.getSession();

return (LRMUser) session.get(LRMUser.class, userId_);
}
catch (Exception e) {
LOG.error(null, e);
}
return null;
}


WARN[17:33:05,734]{XML-RPC-0}(AbstractBatcher closeQueryStatement:280)- exception clearing maxRows/queryTimeout
com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10120][10943] Invalid operation: statement is closed.
at com.ibm.db2.jcc.b.ig.A(ig.java:2337)
at com.ibm.db2.jcc.b.ig.getMaxRows(ig.java:600)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:276)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:212)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1801)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3044)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
at com.ml.lrt.lrm.domain.dataaccess.LRMUserDataAccess.find(LRMUserDataAccess.java:45)
at com.ml.lrt.lrm.pbserver.LRMPlaybookServerHandler.getPlaybookHeadersForUser(LRMPlaybookServerHandler.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:111)
at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:102)
at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:43)
at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:83)
at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:182)
at org.apache.xmlrpc.webserver.Connection.run(Connection.java:175)
at org.apache.xmlrpc.util.ThreadPool$MyThread.runTask(ThreadPool.java:71)
at org.apache.xmlrpc.util.ThreadPool$MyThread.run(ThreadPool.java:87)
WARN[17:33:05,737]{XML-RPC-0}(JDBCExceptionReporter logExceptions:77)- SQL Error: -4499, SQLState: null
ERROR[17:33:05,738]{XML-RPC-0}(JDBCExceptionReporter logExceptions:78)- [ibm][db2][jcc][t4][2030][11211] A communication error has been detected. Communication protocol being used: TCP/IP.
Communication API being used: SOCKETS. Location where the error was detected: Reply.fill().
Communication function detecting the error: InputStream.read(). Protocol specific error codes Insufficient data, * , 0. Message: null


thanks,

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2008 1:58 pm 
Newbie

Joined: Tue Jan 29, 2008 6:07 pm
Posts: 5
I am also seeing this with DB2 Connect from JBoss using Hibernate. The problem is intermittent, although it appears to only happen when the DB connection has been open for a long time (hours) with no activity. In other words, restarting JBoss and running the program within the next few minutes never results in the exception.

Log entry:
Code:
WARN  [AbstractBatcher] [] exception clearing maxRows/queryTimeout
com.ibm.db2.jcc.c.SqlException: [ibm][db2][jcc][10120][10943] Invalid operation: statement is closed.
   at com.ibm.db2.jcc.c.fg.A(fg.java:2329)
   at com.ibm.db2.jcc.c.fg.getMaxRows(fg.java:597)
   at org.jboss.resource.adapter.jdbc.WrappedStatement.getMaxRows(WrappedStatement.java:244)
   at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:225)
   at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:162)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1683)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
WARN  [JDBCExceptionReporter] [] SQL Error: -4499, SQLState: null
ERROR [JDBCExceptionReporter] [] [ibm][db2][jcc][t4][2030][11211] A communication error has been detected. Communication protocol being used: TCP/IP.
Communication API being used: SOCKETS.  Location where the error was detected: T4Agent.sendRequest().
Communication function detecting the error: OutputStream.flush().  Protocol specific error codes Software caused connection abort: socket write error, *, 0.  Message: Software caused connection abort: socket write error


Hibernate 3.1.3
Java 1.5
IBM DB2 8
JBoss 4.0.3 SP1


Top
 Profile  
 
 Post subject: Re: exception clearing maxRows/queryTimeout
PostPosted: Wed Jul 14, 2010 2:41 am 
Newbie

Joined: Wed Jul 20, 2005 12:57 am
Posts: 15
Location: Sydney, Australia
I'm sure the original poster eventually solved the issue... For those who were the directed here from google the answer is at this blog:

http://6by9.wordpress.com/2009/06/18/to ... nnections/

_________________
Christian Maslen


Top
 Profile  
 
 Post subject: Re: exception clearing maxRows/queryTimeout
PostPosted: Mon Jan 24, 2011 12:17 pm 
Newbie

Joined: Mon Jan 24, 2011 12:00 pm
Posts: 1
Thank you for posting the link to the blog. very helpful, and I think all my problems are solved.


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