jsf 2 - hibernate 'org.hibernate.exception.JDBCConnectionException:could not execute query' -


i using jsf 2.0 hibernate..my application work when quit evening exception each morning , had restart application make work.

what can cause

  org.hibernate.exception.jdbcconnectionexception: not execute query org.hibernate.exception.sqlstateconverter.convert(sqlstateconverter.java:97) org.hibernate.exception.jdbcexceptionhelper.convert(jdbcexceptionhelper.java:66) org.hibernate.loader.loader.dolist(loader.java:2231) org.hibernate.loader.loader.listignorequerycache(loader.java:2125) org.hibernate.loader.loader.list(loader.java:2120) org.hibernate.loader.hql.queryloader.list(queryloader.java:401) org.hibernate.hql.ast.querytranslatorimpl.list(querytranslatorimpl.java:361) org.hibernate.engine.query.hqlqueryplan.performlist(hqlqueryplan.java:196) org.hibernate.impl.sessionimpl.list(sessionimpl.java:1148) org.hibernate.impl.queryimpl.list(queryimpl.java:102) chennaivolunteer.common.viewactivitybean.getfirstngo(viewactivitybean.java:156) sun.reflect.generatedmethodaccessor257.invoke(unknown source) sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) java.lang.reflect.method.invoke(method.java:597) javax.el.beanelresolver.getvalue(beanelresolver.java:87) javax.el.compositeelresolver.getvalue(compositeelresolver.java:67) org.apache.myfaces.el.unified.resolver.facescompositeelresolver.getvalue(facescompositeelresolver.java:142) org.apache.el.parser.astvalue.getvalue(astvalue.java:169) org.apache.el.valueexpressionimpl.getvalue(valueexpressionimpl.java:189) org.apache.myfaces.view.facelets.el.tagvalueexpression.getvalue(tagvalueexpression.java:85) org.apache.myfaces.view.facelets.component.uirepeat.getvalue(uirepeat.java:246) org.apache.myfaces.view.facelets.component.uirepeat.getdatamodel(uirepeat.java:209) org.apache.myfaces.view.facelets.component.uirepeat._validateattributes(uirepeat.java:528) org.apache.myfaces.view.facelets.component.uirepeat.process(uirepeat.java:578) org.apache.myfaces.view.facelets.component.uirepeat.encodechildren(uirepeat.java:1137) javax.faces.component.uicomponent.encodeall(uicomponent.java:609) javax.faces.component.uicomponent.encodeall(uicomponent.java:614) javax.faces.component.uicomponent.encodeall(uicomponent.java:614) javax.faces.component.uicomponent.encodeall(uicomponent.java:614) org.apache.myfaces.view.facelets.faceletviewdeclarationlanguage.renderview(faceletviewdeclarationlanguage.java:1159) org.apache.myfaces.application.viewhandlerimpl.renderview(viewhandlerimpl.java:263) org.apache.myfaces.lifecycle.renderresponseexecutor.execute(renderresponseexecutor.java:85) org.apache.myfaces.lifecycle.lifecycleimpl.render(lifecycleimpl.java:239) javax.faces.webapp.facesservlet.service(facesservlet.java:191) org.primefaces.webapp.filter.fileuploadfilter.dofilter(fileuploadfilter.java:79) root cause   com.mysql.jdbc.exceptions.mysqlnontransientconnectionexception: no operations    allowed      after connection closed.connection implicitly closed due underlying exception/error: 

here hibernate.cfg.xml

   <hibernate-configuration>   <session-factory name="">     <property name="connection.driver_class">com.mysql.jdbc.driver</property>         <property name="connection.url">jdbc:mysql://192.168.1.200:3306               /chennai_volunteers</property>        <!-- <property name="connection.url">jdbc:mysql://localhost:330                 /chennai_volunteers</property> -->     <property name="connection.username">root</property>         <property name="connection.password">root</property>   <property name="dialect">org.hibernate.dialect.mysqldialect</property>   <property name="current_session_context_class">thread</property>      <property name="hibernate.connection.pool_size">100</property>    <!-- start c3p0 connection properties -->       <property name="c3p0.min_size">20</property>     <property name="c3p0.max_size">500</property>       <property name="c3p0.timeout">25200</property>     <property name="c3p0.acquireretryattempts">30</property>     <property name="c3p0.acquireincrement">5</property>    <property name="c3p0.idleconnectiontestperiod">14400</property>    <property name="c3p0.initialpoolsize">20</property>  <property name="c3p0.maxpoolsize">300</property>   <property name="c3p0.maxidletime">300</property>  <property name="c3p0.maxstatements">200</property>   <property name="c3p0.minpoolsize">10</property>    </session-factory>   </hibernate-configuration> 

thanks in advance.

see settings maxidletime here maxidletime in c3p0

if want connection last ever need set 0 (the default 0). since set 300 secs next morning idle connections have been culled.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -