Could not open Hibernate Session for transaction

karthikkumark85

New member
Hi,
We have created web app using grails. I have started tomcat yesterday and it was working fine. i didn't stop the tomcat. When i checked it today our app throwing follwoing exception....


Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed:
Servlet: grails
URI: /grails/analytics/analyticsChart.dispatch
Exception Message: Connection timed out
Caused by: Connection timed out
Class: AnalyticsController
At Line: [79]
Code Snippet:
Stack Trace

java.net.SocketException: Connection timed out

at java.net.SocketOutputStream.socketWrite0(Native Method)

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)

at java.net.SocketOutputStream.write(SocketOutputStream.java:153)

at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)

at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3227)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1917)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)

at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4874)

at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371)

at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328)

at $Proxy8.setAutoCommit(Unknown Source)

at com.july.customerportal.common.AnalyticsUtilsService$$EnhancerByCGLIB$$603b6d7e.getAnalyticsDatesByDates(<generated>)

at com.july.customerportal.common.AnalyticsUtilsService$getAnalyticsDatesByDates.call(Unknown Source)

at com.july.customerportal.analytics.AnalyticsController$_closure4.doCall(AnalyticsController.groovy:79)

at com.july.customerportal.analytics.AnalyticsController$_closure4.doCall(AnalyticsController.groovy)

at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)

at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)

at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)

at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)

at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:343)

at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)

at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83)

at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)

at java.lang.Thread.run(Thread.java:636)




can anyone explain why it is coming and seeking for the solution....
 
Top