You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Pa...@chase.com on 2001/02/13 20:36:01 UTC

Problem with esql : java.lang.RuntimeException: Error setting connection autocommit

Has anyone come across this problem. I am querying a sybase database with jConnect 4.2 Tomcat 3.2.1 Cocoon 1.8.2

I am running the example sql xsp with slight changes to the select and database connection.

java.lang.RuntimeException: Error setting connection autocommit
     at _home._husseinp._tomcat._webapps._cocoon._samples._sql._esql.populateDocument(_esql.java, Compiled Code)
     at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java, Compiled Code)
     at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java, Compiled Code)
     at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
     at org.apache.cocoon.Cocoon.service(Cocoon.java, Compiled Code)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
     at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, Compiled Code)
     at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code)
     at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code)
     at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code)
     at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code)
     at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java, Compiled Code)
     at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
     at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
     at java.lang.Thread.run(Thread.java, Compiled Code)

Regards

Paul Hussein.



Re: Problem with esql : java.lang.RuntimeException: Error setting connection autocommit

Posted by Donald Ball <ba...@webslingerZ.com>.
On Tue, 13 Feb 2001 Paul.Hussein@chase.com wrote:

> Has anyone come across this problem. I am querying a sybase database
> with jConnect 4.2 Tomcat 3.2.1 Cocoon 1.8.2
>
> I am running the example sql xsp with slight changes to the select and
> database connection.

it rather looks like the sybase jbdc driver you're using isn't jdbc
compliant. the section of code that's causing you trouble is here:

        if ("false".equals(String.valueOf(<xsl:copy-of
select="$autocommit"/>))) {
          _esql_connection.connection.setAutoCommit(false);
        } else {
          _esql_connection.connection.setAutoCommit(true);
        }
      } catch (Exception _esql_exception_<xsl:value-of
select="generate-id(.)"/>) {
        throw new RuntimeException("Error setting connection autocommit");
      }

connection.setAutoCommit(true) should _never_ throw an exception, since
that's the default mode for JDBC connections. is it possible that there is
a later sybase driver available? are you manually setting esql:autocommit?

- donald