If you're seeing this issue with 2.0 Final, maybe it's caused by the following change? I don't think these changes should affect anything, but you never know.
http://tinyurl.com/ysot66 Matt On 9/25/07, sparqle <[EMAIL PROTECTED]> wrote: > > Hello Pete, > > Thank you for the response. I agree with that option 1 below should be > avoided - if possible. > Regarding, option 2, that is what I have tried already with the > autoReconnect=true option in the URL. I am not sure why it is not working. > Also, I expected at least dbcp to be able to handle stale connections > cleanly. On the mysql link that you posted, they have indicated that > autoReconnect is deprecated and will be removed in the future. May be they > have already removed it from my version of MySQL. So, my only clean option > is for dbcp to handle it automatically. But, it does not seem to be doing > it. > I have tried it in other applications (non Appfuse), and this autoReconnect > has always worked for me. > > regards > > > Pete Gould wrote: > > > > Hiya, > > > > Seems to be a couple of different ways of addressing this problem (none of > > which I've tried ;p), but maybe this will be of some use to you before > > someone who knows what they're talking about offers a hand! > > > > 1. Increase the *wait_timeout* setting in your mysql.ini or mysql.cnf > > file.. > > which seems to be quoted at a lot of places doing a quick google on those > > terms. Got to assume that there's some good reason the the default is 8 > > hours though! Ref for system properties is here: > > http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#option_mysqld_wait_timeout > > > > 2. Implement something along the lines of what's suggested in section "* > > 26.4.5.3.4: **I have a servlet/application that works fine for a day, and > > then stops working overnight" *of > > http://dev.mysql.com/doc/refman/5.0/es/connector-j-usagenotes-troubleshooting.html > > > > Cheers, > > > > Pete > > > > > > On 9/25/07, sparqle <[EMAIL PROTECTED]> wrote: > >> > >> > >> Hello, > >> > >> I am using Appfuse2.0 RC1, and I get the following JDBC exception every > >> morning on my application (if I am the first person to login). I am > >> guessing > >> that this is happening due to a timeout of the MySQL connections. > >> I tried changing the URL of my database to include the > >> "autoReconnect=true" > >> (in jdbc.properties and applicationContext-resources). Still, I keep > >> getting > >> the same error every morning. > >> Is there any other setting that needs to be changed? > >> > >> regards > >> > >> org.springframework.transaction.CannotCreateTransactionException: Could > >> not > >> open Hibernate Session for transaction; nested exception is > >> org.hibernate.TransactionException: JDBC begin failed: > >> Caused by: org.hibernate.TransactionException: JDBC begin failed: > >> at org.hibernate.transaction.JDBCTransaction.begin( > >> JDBCTransaction.java:68) > >> at > >> org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java > >> :1326) > >> at > >> org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin( > >> HibernateTransactionManager.java:510) > >> at > >> > >> org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction > >> (AbstractPlatformTransactionManager.java:350) > >> at > >> > >> org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary > >> (TransactionAspectSupport.java:262) > >> at > >> org.springframework.transaction.interceptor.TransactionInterceptor.invoke( > >> TransactionInterceptor.java:102) > >> at > >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > >> ReflectiveMethodInvocation.java:166) > >> at > >> org.springframework.aop.framework.JdkDynamicAopProxy.invoke( > >> JdkDynamicAopProxy.java:204) > >> at $Proxy25.loadUserByUsername(Unknown Source) > >> at > >> org.acegisecurity.providers.dao.DaoAuthenticationProvider.retrieveUser( > >> DaoAuthenticationProvider.java:100) > >> at > >> > >> org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate > >> (AbstractUserDetailsAuthenticationProvider.java:119) > >> at > >> org.acegisecurity.providers.ProviderManager.doAuthentication( > >> ProviderManager.java:195) > >> at > >> org.acegisecurity.AbstractAuthenticationManager.authenticate( > >> AbstractAuthenticationManager.java:45) > >> at > >> > >> org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication > >> (AuthenticationProcessingFilter.java:71) > >> at > >> org.acegisecurity.ui.AbstractProcessingFilter.doFilter( > >> AbstractProcessingFilter.java:211) > >> at > >> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( > >> FilterChainProxy.java:275) > >> at > >> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter( > >> HttpSessionContextIntegrationFilter.java:286) > >> at > >> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( > >> FilterChainProxy.java:275) > >> at > >> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java > >> :149) > >> at > >> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java > >> :98) > >> at > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( > >> ApplicationFilterChain.java:215) > >> at > >> org.apache.catalina.core.ApplicationFilterChain.doFilter( > >> ApplicationFilterChain.java:188) > >> at > >> org.apache.catalina.core.StandardWrapperValve.invoke( > >> StandardWrapperValve.java:213) > >> at > >> org.apache.catalina.core.StandardContextValve.invoke( > >> StandardContextValve.java:174) > >> at > >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java > >> :127) > >> at > >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java > >> :117) > >> at > >> org.apache.catalina.core.StandardEngineValve.invoke( > >> StandardEngineValve.java:108) > >> at > >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java > >> :151) > >> at > >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) > >> at > >> > >> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection > >> (Http11BaseProtocol.java:665) > >> at > >> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( > >> PoolTcpEndpoint.java:528) > >> at > >> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( > >> LeaderFollowerWorkerThread.java:81) > >> at > >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( > >> ThreadPool.java:689) > >> at java.lang.Thread.run(Unknown Source) > >> Caused by: com.mysql.jdbc.CommunicationsException: Communications link > >> failure due to underlying exception: > >> > >> ** BEGIN NESTED EXCEPTION ** > >> > >> java.net.SocketException > >> MESSAGE: Software caused connection abort: recv failed > >> > >> STACKTRACE: > >> > >> java.net.SocketException: Software caused connection abort: recv failed > >> at java.net.SocketInputStream.socketRead0(Native Method) > >> at java.net.SocketInputStream.read(Unknown Source) > >> at > >> com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java > >> :113) > >> at > >> > >> com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary > >> (ReadAheadInputStream.java:160) > >> at > >> com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java > >> :188) > >> at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1960) > >> at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2375) > >> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2874) > >> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623) > >> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715) > >> at com.mysql.jdbc.Connection.execSQL(Connection.java:3243) > >> at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5371) > >> at > >> org.apache.commons.dbcp.DelegatingConnection.setAutoCommit( > >> DelegatingConnection.java:331) > >> at > >> > >> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit > >> (PoolingDataSource.java:317) > >> at org.hibernate.transaction.JDBCTransaction.begin( > >> JDBCTransaction.java:63) > >> at > >> org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java > >> :1326) > >> at > >> org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin( > >> HibernateTransactionManager.java:510) > >> at > >> > >> org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction > >> (AbstractPlatformTransactionManager.java:350) > >> at > >> > >> org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary > >> (TransactionAspectSupport.java:262) > >> at > >> org.springframework.transaction.interceptor.TransactionInterceptor.invoke( > >> TransactionInterceptor.java:102) > >> at > >> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > >> ReflectiveMethodInvocation.java:166) > >> at > >> org.springframework.aop.framework.JdkDynamicAopProxy.invoke( > >> JdkDynamicAopProxy.java:204) > >> at $Proxy25.loadUserByUsername(Unknown Source) > >> at > >> org.acegisecurity.providers.dao.DaoAuthenticationProvider.retrieveUser( > >> DaoAuthenticationProvider.java:100) > >> at > >> > >> org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate > >> (AbstractUserDetailsAuthenticationProvider.java:119) > >> at > >> org.acegisecurity.providers.ProviderManager.doAuthentication( > >> ProviderManager.java:195) > >> at > >> org.acegisecurity.AbstractAuthenticationManager.authenticate( > >> AbstractAuthenticationManager.java:45) > >> at > >> > >> org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication > >> (AuthenticationProcessingFilter.java:71) > >> at > >> org.acegisecurity.ui.AbstractProcessingFilter.doFilter( > >> AbstractProcessingFilter.java:211) > >> at > >> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( > >> FilterChainProxy.java:275) > >> at > >> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter( > >> HttpSessionContextIntegrationFilter.java:286) > >> at > >> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( > >> FilterChainProxy.java:275) > >> at > >> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java > >> :149) > >> at > >> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java > >> :98) > >> at > >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( > >> ApplicationFilterChain.java:215) > >> at > >> org.apache.catalina.core.ApplicationFilterChain.doFilter( > >> ApplicationFilterChain.java:188) > >> at > >> org.apache.catalina.core.StandardWrapperValve.invoke( > >> StandardWrapperValve.java:213) > >> at > >> org.apache.catalina.core.StandardContextValve.invoke( > >> StandardContextValve.java:174) > >> at > >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java > >> :127) > >> at > >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java > >> :117) > >> at > >> org.apache.catalina.core.StandardEngineValve.invoke( > >> StandardEngineValve.java:108) > >> -- > >> View this message in context: > >> http://www.nabble.com/Getting-JDBC-Exception-if-application-not-used-for-more-than-8-hours-tf4515722s2369.html#a12879969 > >> Sent from the AppFuse - User mailing list archive at Nabble.com. > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Getting-JDBC-Exception-if-application-not-used-for-more-than-8-hours-tf4515722s2369.html#a12887627 > Sent from the AppFuse - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
