SOM-Research / gila

Label analysis of GitHub projects
https://som-research.uoc.edu/research-tools/
17 stars 4 forks source link

Problem with connections to database #15

Closed jlcanovas closed 10 years ago

jlcanovas commented 10 years ago

The servlet crashes after some time executing.

It seems to be a problem with the connection pool. Tracking the exception trace:

at fr.inria.atlanmod.labelanalysis.data.ProjectDAO.getAllProjects(ProjectDAO.java:26)
    at fr.inria.atlanmod.labelanalysis.model.LabelAnalyzer.getAllProjects(LabelAnalyzer.java:158)
    at fr.inria.atlanmod.labelanalysis.model.LabelAnalysisRequestHandler.handleRequest(LabelAnalysisRequestHandler.java:89)
    at fr.inria.atlanmod.labelanalysis.servlets.LabelAnalysisServlet.doGet(LabelAnalysisServlet.java:43)

it refers to ProjectDAO line 26, which is

 stmt = con.createStatement();
jlcanovas commented 10 years ago

Just to inform, here you are the full trace:

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)
    at com.mysql.jdbc.Connection.checkClosed(Connection.java:1932)
    at com.mysql.jdbc.Connection.createStatement(Connection.java:3121)
    at com.mysql.jdbc.Connection.createStatement(Connection.java:3103)
    at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
    at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
    at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80)
    at com.sun.proxy.$Proxy75.createStatement(Unknown Source)
    at fr.inria.atlanmod.labelanalysis.data.ProjectDAO.getAllProjects(ProjectDAO.java:26)
    at fr.inria.atlanmod.labelanalysis.model.LabelAnalyzer.getAllProjects(LabelAnalyzer.java:158)
    at fr.inria.atlanmod.labelanalysis.model.LabelAnalysisRequestHandler.handleRequest(LabelAnalysisRequestHandler.java:89)
    at fr.inria.atlanmod.labelanalysis.servlets.LabelAnalysisServlet.doGet(LabelAnalysisServlet.java:43)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)