1 Reply Latest reply on Mar 11, 2009 12:05 PM by peterj

    java.sql.SQLException: You cannot commit with autocommit set

      ERROR [STDERR] java.sql.SQLException: You cannot commit with autocommit set!
      10:12:37,161 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:645)
      10:12:37,161 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:486)
      10:12:37,161 ERROR [STDERR] at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:278)
      10:12:37,489 ERROR [STDERR] at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:865)
      10:12:37,489 ERROR [STDERR] at com.sun.sql.rowset.CachedRowSetXImpl5.execute(CachedRowSetXImpl5.java:1325)
      10:12:37,489 ERROR [STDERR] at voip.secureAdmin.Ramal.prerender(Ramal.java:220)
      10:12:37,489 ERROR [STDERR] at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.prerender(ViewHandlerImpl.java:815)
      10:12:37,489 ERROR [STDERR] at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:303)
      10:12:37,489 ERROR [STDERR] at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
      10:12:37,489 ERROR [STDERR] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      10:12:37,489 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      10:12:37,489 ERROR [STDERR] at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
      10:12:37,489 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      10:12:37,489 ERROR [STDERR] at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      10:12:37,489 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      10:12:37,489 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      10:12:37,489 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      10:12:37,489 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      10:12:37,489 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      10:12:37,489 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      10:12:37,489 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      10:12:37,489 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      10:12:37,489 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)

        • 1. Re: java.sql.SQLException: You cannot commit with autocommit
          peterj

          Hmm, strange post.

          First, its not in the right forum (this doesn't look like a problem with the JBoss Forums package to me).

          Second, there is no explanation whatsoever about what was going on to cause this exception.

          Third, no mention of JBoss AS level or JDK level. Or of what software is being used (Hibernate? JPA?)

          Fourth, the output appears to be from a user-written app, and not from JBoss AS or one of its components (the error is written to stderr, JBoss components typically write to the log directly).

          Fifth, based on the above analysis the bug is in the user's code and the error message clearly states what the issue is and the resolution can be easily implied from the error message.