-->
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.  [ 1 post ] 
Author Message
 Post subject: How to fix error net.sf.hibernate.JDBCException: SQLExceptio
PostPosted: Fri Oct 01, 2004 12:05 am 
Newbie

Joined: Thu Sep 30, 2004 11:41 pm
Posts: 11
Hello

I'm using Hibernate + Struts with Tomcat 4.1 + MySQL for develop my application. Anything well in testing and development (shorttime). But when i changed system time (up several days) a error occurred. I think some connection are dead or some connection pooling mechanism caused that error. Please tell me how to fix that error ? I 've posted all information i have. Thank you.

Henry Le


Hibernate version:2.1

Mapping documents:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory name="hibernate/SessionFactory">
<!-- properties -->
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<property name="connection.username">root</property>
<property name="connection.password"/>
<property name="connection.url">jdbc:mysql://localhost:3306/dbtest?useUnicode=true&amp;characterEncoding=utf8</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<property name="transaction.factory_class">net.sf.hibernate.transaction.JDBCTransactionFactory</property>
<property name="dbcp.minIdle">10</property>
<property name="cache.use_query_cache">true</property>
<!-- mapping files -->
<mapping resource="org/cpy/test/datamanagement/domain/Product.hbm.xml"/>
</session-factory>
</hibernate-configuration>





Full stack trace of any exception that occurs:
net.sf.hibernate.JDBCException: SQLException occurred
------------------
net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3612)
net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)
org.humanware.tlaptop.datamanagement.dao.BaseDAO.findAll(BaseDAO.java:300)
org.humanware.tlaptop.datamanagement.dao.BaseDAO.findAll(BaseDAO.java:266)
org.humanware.tlaptop.datamanagement.dao.BaseDAO.findAll(BaseDAO.java:251)
org.humanware.tlaptop.delegate.ProductDisplayDelegate.getAllProduct(ProductDisplayDelegate.java:31)
org.humanware.tlaptop.delegate.DisplayDelegateImp.getAllProduct(DisplayDelegateImp.java:44)
org.apache.jsp.test_jsp._jspService(test_jsp.java:56)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
org.humanware.tlaptop.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:89)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:324)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:395)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)



Name and version of the database i'm using:
MySQL 4.0


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.