-->
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: Strange problem with Hibernate pool connection
PostPosted: Fri Oct 19, 2007 12:58 pm 
Newbie

Joined: Tue Jun 12, 2007 11:07 am
Posts: 9
Hi,
when run my application, after randomic time, I get this Hibernate
exception:

---------------------------------------------------------------------------­­----------
WARNING: SQL Error: 0, SQLState: 08S01
Oct 8, 2007 8:53:08 AM org.hibernate.util.JDBCExceptionReporter
logExceptions
SEVERE: Communication link failure: java.io.EOFException, underlying
cause: null


** BEGIN NESTED EXCEPTION **


java.io.EOFException


STACKTRACE:


java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1319)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
1496)
at
org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:
186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.j­ava:
236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:
94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at
workcity.data.hibernate.TlWcParamitersHome.findByExample(TlWcParamitersHome­.java:
121)
at workcity.servlet.WorkcityInfo.doPost(WorkcityInfo.java:17)
at workcity.servlet.WorkcityInfo.doGet(WorkcityInfo.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio­nFilterChain.java:
252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC­hain.java:
173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j­ava:
213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j­ava:
178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav­a:
107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
869)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja­va:
527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW­orkerThread.java:
80)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **
---------------------------------------------------------------------------­


This is my hibernate configuration in hibernate.cfg.xml file


<property name="hibernate.bytecode.use_reflection_optimizer">false</
property>
<property
name="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</
property>
<property name="hibernate.cache.use_minimal_puts">false</ property>
<property name="hibernate.cache.use_query_cache">false</ property>
<property name="hibernate.connection.autoReconnect">true</ property>
<property name="hibernate.connection.autoReconnectForPools">true</
property>
<property name="hibernate.connection.autocommit">true</ property>
<property
name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</
property>
<property name="hibernate.connection.is-connection-validation-
required">true</property>
<property name="hibernate.connection.password">admin</ property>
<property name="hibernate.connection.pool_size">1</property>
<property name="hibernate.connection.url">jdbc:mysql:// localhost/
workcity</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.current_session_context_class">thread</
property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</
property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.max_fetch_depth">3</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.use_sql_comments">true</property>


I use Hibernate 3.2 and Java 1.5.0

Can you help my to find the problem ?


Thanks,
Carlo


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 7:55 am 
Regular
Regular

Joined: Mon Jan 22, 2007 10:32 am
Posts: 101
Not sure but it seems like you lose connection to you DB which in turn results in this exception.

_________________
Please rate this post if you find it helpful


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.