cancel
Showing results for 
Search instead for 
Did you mean: 

Driver may not support getAutocommit()

palumpa
Champ in-the-making
Champ in-the-making
Hey.
I use the Activiti 5.2 demo on a Windows 7 machine with a MySQL 5.5.
The Database works fine, but i have a Problem when i long time not logged in (f.e. in the Explorer).
Then i got the first time the follow Exception:
org.springframework.extensions.webscripts.connector.AuthenticatingConnector handshake
SCHWERWIEGEND: An exception occurred while attempting authentication handshake for endpoint: http://localhost:8080/activiti-rest/service
org.springframework.extensions.surf.exception.AuthenticationException: 05280003 Wrapped Exception (with status template): Error configuring AutoCommit.  Your driver may not support getAutoCommit() or setAutoCommit(). Requested setting: false.  Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 147 ms ago.
   at org.activiti.surf.ActivitiRESTAuthenticator.authenticate(ActivitiRESTAuthenticator.java:97)
   at org.springframework.extensions.webscripts.connector.AuthenticatingConnector.handshake(AuthenticatingConnector.java:403)
   at org.activiti.surf.ActivitiUserFactory.authenticate(ActivitiUserFactory.java:141)
   at org.springframework.extensions.surf.mvc.LoginController.handleRequestInternal(LoginController.java:67)
   at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
   at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
   at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
   at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
   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.java:417)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:662)

When i wait 5-10 Seconds after these, i can problemless log in.
What can i do? Change the JDBC-driver? How? (I am new in all these Java/JDBC-things.)

Thanks.
Palumpa
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Looks like some connection issue while trying to use the connection… Is it a local MySQL database or does the db-connection go over the wire?

palumpa
Champ in-the-making
Champ in-the-making
The databaseserver is on localhost.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
this happens if you do not use something like c3p0 for connectionpooling… at least in other apps with hibernate/mysql. Might be Ibatis has built-in functionality that needs to be configured. Not sure.

palumpa
Champ in-the-making
Champ in-the-making
Ok, i have no idea what Ibatis is. Maybe Google can help me Smiley Happy
When i need to configure this, how can i do this?

Thanks.

ovonel
Champ in-the-making
Champ in-the-making
I have the same problem.
Did you solved it through configuration of the connectionpool ?