imirsel / nemadiy

Automatically exported from code.google.com/p/nemadiy
0 stars 0 forks source link

mysql connection dropped #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
After a couple of days of inactivity, middleware drops the mysql database
connection.

Yikes!

org.springframework.transaction.CannotCreateTransactionException: Could not
open Hibernate Session for transaction; nested exception is
org.hibernate.TransactionException: JDBC begin failed: 
    at
org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(Hibernate
TransactionManager.java:541)
    at
org.springframework.transaction.support.AbstractPlatformTransactionManager.getTr
ansaction(AbstractPlatformTransactionManager.java:350)
    at
org.springframework.transaction.interceptor.TransactionAspectSupport.createTrans
actionIfNecessary(TransactionAspectSupport.java:262)
    at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transa
ctionInterceptor.java:101)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:171)
    at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInv
ocationInterceptor.java:89)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:171)
    at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:204)
    at $Proxy25.getFlowTemplates(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils
.java:307)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Ref
lectiveMethodInvocation.java:182)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:149)
    at
org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(Rem
oteInvocationTraceInterceptor.java:77)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:171)
    at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:204)
    at $Proxy25.getFlowTemplates(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.ja
va:205)
    at
org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(Defa
ultRemoteInvocationExecutor.java:38)
    at
org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(Remote
InvocationBasedExporter.java:78)
    at
org.springframework.remoting.rmi.RmiBasedExporter.invoke(RmiBasedExporter.java:7
2)
    at
org.springframework.remoting.rmi.RmiInvocationWrapper.invoke(RmiInvocationWrappe
r.java:72)
    at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
85)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    at
org.springframework.remoting.support.RemoteInvocationUtils.fillInClientStackTrac
eIfPossible(RemoteInvocationUtils.java:47)
    at
org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientIntercep
tor.java:347)
    at
org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientIntercepto
r.java:258)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:171)
    at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:204)
    at $Proxy34.getFlowTemplates(Unknown Source)
    at
org.imirsel.nema.webapp.controller.FlowController.getTemplateFlows(FlowControlle
r.java:95)
    at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeName
dMethod(MultiActionController.java:473)
    at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequ
estInternal(MultiActionController.java:410)
    at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractCon
troller.java:153)
    at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(Simple
ControllerHandlerAdapter.java:48)
    at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.j
ava:875)
    at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.ja
va:809)
    at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet
.java:571)
    at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501
)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1166)
    at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118
)
    at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1157)
    at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
    at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
    at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90
)
    at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.jav
a:406)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1157)
    at
org.imirsel.nema.webapp.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:7
4)
    at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1157)
    at
com.opensymphony.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:4
2)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1157)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:359)
    at
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(Filt
erSecurityInterceptor.java:109)
    at
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(Fi
lterSecurityInterceptor.java:83)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(Exceptio
nTranslationFilter.java:101)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFil
terHttp(AnonymousProcessingFilter.java:105)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHt
tp(RememberMeProcessingFilter.java:116)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doF
ilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(Bas
icProcessingFilter.java:172)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractPr
ocessingFilter.java:268)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.ja
va:87)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(Ses
sionFixationProtectionFilter.java:61)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilte
rHttp(HttpSessionContextIntegrationFilter.java:235)
    at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
    at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
    at
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.jav
a:174)
    at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFi
lterProxy.java:236)
    at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterPr
oxy.java:167)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1157)
    at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Characte
rEncodingFilter.java:96)
    at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollecti
on.java:230)
    at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.ja
va:923)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
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(Hibernate
TransactionManager.java:510)
    ... 129 more
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 sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
com.mchange.v2.c3p0.impl.C3P0PooledConnection$ProxyConnectionInvocationHandler.i
nvoke(C3P0PooledConnection.java:712)
    at com.mchange.v2.c3p0.impl.$Proxy15.setAutoCommit(Unknown Source)
    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(Hibernate
TransactionManager.java:510)
    at
org.springframework.transaction.support.AbstractPlatformTransactionManager.getTr
ansaction(AbstractPlatformTransactionManager.java:350)
    at
org.springframework.transaction.interceptor.TransactionAspectSupport.createTrans
actionIfNecessary(TransactionAspectSupport.java:262)
    at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transa
ctionInterceptor.java:101)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:171)
    at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInv
ocationInterceptor.java:89)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:171)
    at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:204)
    at $Proxy25.getFlowTemplates(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils
.java:307)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Ref
lectiveMethodInvocation.java:182)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:149)
    at
org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(Rem
oteInvocationTraceInterceptor.java:77)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:171)
    at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:204)
    at $Proxy25.getFlowTemplates(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.ja
va:205)
    at
org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(Defa
ultRemoteInvocationExecutor.java:38)
    at
org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(Remote
InvocationBasedExporter.java:78)
    at
org.springframework.remoting.rmi.RmiBasedExporter.invoke(RmiBasedExporter.java:7
2)
    at
org.springframework.remoting.rmi.RmiInvocationWrapper.invoke(RmiInvocationWrappe
r.java:72)
    at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
85)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)

** END NESTED EXCEPTION **

Last packet sent to the server was 1 ms ago.
    at
com.mchange.v2.c3p0.impl.C3P0PooledConnection$ProxyConnectionInvocationHandler.i
nvoke(C3P0PooledConnection.java:733)
    at com.mchange.v2.c3p0.impl.$Proxy15.setAutoCommit(Unknown Source)
    at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)
    ... 131 more

Original issue reported on code.google.com by kumarami...@gmail.com on 1 Feb 2010 at 2:34

GoogleCodeExporter commented 9 years ago
This seems to happen at the flowservice end

http://nema.lis.uiuc.edu:8080/diy/get/FlowManager.getTemplateFlows?type=extracti
on

When I restarted the middleware the error didn't go away, however after 
restarting
the flowservice. It worked.

Original comment by kumarami...@gmail.com on 1 Feb 2010 at 2:41

GoogleCodeExporter commented 9 years ago
?autoReconnect=true&autoReconnectForPools=true

Added to the jdbc url -The autoReconnect will always throw an exception before 
it
autoReconnects

http://forums.mysql.com/read.php?39,292532,292687#msg-292687

Original comment by kumarami...@gmail.com on 8 Feb 2010 at 10:15