Hello, have You a solution found? I'am really need it. (Appfuse 2.0.2)
Thanks Bye Richard Paul wrote: > > Somewhat related, if I have the application running, then restart MySQL > server I get the same problem on the first request. Still haven't worked > out what is going wrong though. > > > Richard Paul wrote: >> >> Adding autoReconnect=true to the jdbc.url doesn't seem to have helped, >> the connections become stale somewhere between 6.5 and 10.5 hours. >> Seems strange that others aren't experiencing the same problem, I'll >> check my configuration in case it has strayed from the default in some >> way. >> >> >> Richard Paul wrote: >>> >>> The CannotCreateTransactionException are continuing even on MySQL server >>> 5.0.45. I'll try manually adding 'autoReconnect=true' to my connection >>> string as you suggested. I am using mysql-connector-java 5.0.5 as you >>> can see below, I'll let you know how I get on. >>> >>> <jdbc.groupId>mysql</jdbc.groupId> >>> <jdbc.artifactId>mysql-connector-java</jdbc.artifactId> >>> <jdbc.version>5.0.5</jdbc.version> >>> <jdbc.driverClassName>com.mysql.jdbc.Driver</jdbc.driverClassName> >>> <jdbc.url><![CDATA[jdbc:mysql://localhost/sir?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8&autoReconnect=true]]></jdbc.url> >>> >>> >>> mraible wrote: >>>> >>>> AppFuse 2.0 uses MySQL version 5.0.5, which is the most recent on in >>>> Maven's repository. >>>> >>>> http://mvnrepository.com/artifact/mysql/mysql-connector-java >>>> >>>> Matt >>>> >>>> On 9/25/07, Richard Paul <[EMAIL PROTECTED]> wrote: >>>>> >>>>> I believe I am using the JDBC driver provided by appfuse. >>>>> I upgraded the MySQL server from 5.0.26 to 5.0.45 and the problem >>>>> seems to >>>>> have disappeared. >>>>> >>>>> >>>>> >>>>> mraible wrote: >>>>> > >>>>> > It sounds like you need to add autoReconnect=true to your jdbc.url. >>>>> I >>>>> > believe this was added by default to recent versions of the MySQL >>>>> > Driver - maybe you're using an older driver? >>>>> > >>>>> > Matt >>>>> > >>>>> > On 9/23/07, Richard Paul <[EMAIL PROTECTED]> wrote: >>>>> >> >>>>> >> I'm having a similar problem with Appfuse 2.0-final. After a night >>>>> of >>>>> >> inactivity the following exception is thrown the first time a user >>>>> >> attempts >>>>> >> to use the application. Subsequent requests work as normal. The >>>>> DBCP >>>>> >> setup >>>>> >> is the default provided by Appfuse and the MySql (5.0.26) install >>>>> hasn't >>>>> >> been configured in any way. Any suggestions greatly appreciated. >>>>> >> >>>>> >> /src/main/resources/applicationContext.xml >>>>> >> ... >>>>> >> <bean id="dataSource" >>>>> class="org.apache.commons.dbcp.BasicDataSource" >>>>> >> destroy-method="close"> >>>>> >> <property name="driverClassName" >>>>> >> value="${jdbc.driverClassName}"/> >>>>> >> <property name="url" value="${jdbc.url}"/> >>>>> >> <property name="username" value="${jdbc.username}"/> >>>>> >> <property name="password" value="${jdbc.password}"/> >>>>> >> <property name="maxActive" value="100"/> >>>>> >> <property name="maxWait" value="1000"/> >>>>> >> <property name="poolPreparedStatements" value="true"/> >>>>> >> <property name="defaultAutoCommit" value="true"/> >>>>> >> </bean> >>>>> >> ... >>>>> >> >>>>> >> Exception propagated to the exception handler (and presented to the >>>>> >> user): >>>>> >> >>>>> >> 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:161) >>>>> >> at >>>>> >> >>>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) >>>>> >> at $Proxy23.loadUserByUsername(Unknown Source) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.providers.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:87) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:115) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:188) >>>>> >> 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:199) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) >>>>> >> 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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) >>>>> >> at >>>>> >> >>>>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) >>>>> >> 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:210) >>>>> >> 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:870) >>>>> >> 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:685) >>>>> >> at java.lang.Thread.run(Thread.java:595) >>>>> >> Caused by: com.mysql.jdbc.CommunicationsException: Communications >>>>> link >>>>> >> failure due to underlying exception: >>>>> >> >>>>> >> ** BEGIN NESTED EXCEPTION ** >>>>> >> >>>>> >> java.io.EOFException >>>>> >> >>>>> >> STACKTRACE: >>>>> >> >>>>> >> java.io.EOFException >>>>> >> at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1963) >>>>> >> 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:161) >>>>> >> at >>>>> >> >>>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) >>>>> >> at $Proxy23.loadUserByUsername(Unknown Source) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.providers.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:87) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:115) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:188) >>>>> >> 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:199) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) >>>>> >> at >>>>> >> >>>>> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) >>>>> >> 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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) >>>>> >> at >>>>> >> >>>>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) >>>>> >> 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:210) >>>>> >> 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:870) >>>>> >> 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:685) >>>>> >> at java.lang.Thread.run(Thread.java:595) >>>>> >> >>>>> >> >>>>> >> ** END NESTED EXCEPTION ** >>>>> >> >>>>> >> >>>>> >> >>>>> >> Last packet sent to the server was 1 ms ago. >>>>> >> at >>>>> com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2586) >>>>> >> 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) >>>>> >> ... 37 more >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> mraible wrote: >>>>> >> > >>>>> >> > If you're using AppFuse 1.9.x, your dataSource is configured >>>>> >> > WEB-INF/classes/applicationContext-resources.xml (in your final >>>>> WAR). >>>>> >> > The same thing applies to AppFuse 2.x. However, in 2.x, the jdbc >>>>> >> > attributes are in a jdbc.properties file in the same directory. >>>>> >> > >>>>> >> > Matt >>>>> >> > >>>>> >> > On 9/6/07, romsrini <[EMAIL PROTECTED]> wrote: >>>>> >> >> >>>>> >> >> Michael, >>>>> >> >> >>>>> >> >> This is going to sound dumb, but I'm not sure how our pool is >>>>> >> configured. >>>>> >> >> We're using the appFuse defaults. Where can I find the >>>>> configuration >>>>> >> file >>>>> >> >> or >>>>> >> >> what is the config file called in appFuse? >>>>> >> >> >>>>> >> >> Matt, >>>>> >> >> >>>>> >> >> Thanks for the link. I had found some similar (but a couple of >>>>> years >>>>> >> old) >>>>> >> >> pages. I essentially have the same questions as the guy in the >>>>> thread >>>>> >> you >>>>> >> >> sent. I just hope someone answers him. >>>>> >> >> -- >>>>> >> >> View this message in context: >>>>> >> >> >>>>> >> >>>>> http://www.nabble.com/How-to-deal-with-potential-stale-connections-in-pool--tf4387600s2369.html#a12527921 >>>>> >> >> 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] >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> >>>>> >> -- >>>>> >> View this message in context: >>>>> >> >>>>> http://www.nabble.com/How-to-deal-with-potential-stale-connections-in-pool--tf4387600s2369.html#a12853058 >>>>> >> 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] >>>>> > >>>>> > >>>>> > >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://www.nabble.com/How-to-deal-with-potential-stale-connections-in-pool--tf4387600s2369.html#a12889913 >>>>> >>>>> 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] >>>> >>>> >>>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/How-to-deal-with-potential-stale-connections-in-pool--tp12509187s2369p20748287.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
