You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark Berry <ma...@shareaphoto.com> on 2000/08/14 17:52:11 UTC

Hello all, quick question

Hi,

I am dabbeling w/Cocoon right now and am having a strange problem ..

I am running Tomcat w/the latest stable build of MySQL and latest stable
release of Cocoon.


This is the error that I am getting:

java.sql.SQLException: Can't call commit when autocommit=true
        at org.gjt.mm.mysql.Connection.rollback(Connection.java)
        at
org.apache.cocoon.processor.sql.SQLProcessor.processQuery(SQLProcessor.java:298)

        at
org.apache.cocoon.processor.sql.SQLProcessor.process(SQLProcessor.java:140)

        at org.apache.cocoon.Engine.handle(Engine.java:283)
        at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:368)

        at org.apache.tomcat.core.Handler.service(Handler.java:261)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:356)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:720)

        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:666)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:194)

        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)

        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)

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





Here is my XML code:


<?xml version="1.0"?>

<?cocoon-process type="sql"?>
<?xml-stylesheet href="db-ss.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>

<page>
 <title>Database Tests</title>
 <connectiondefs>
  <autoCommit>false</autoCommit>
  <connection name="foo_connection">
   <driver>org.gjt.mm.mysql.Driver</driver>
   <dburl>jdbc:mysql://localhost/mydb</dburl>
   <username>myname</username>
   <password>mypasswd</password>
  </connection>
 </connectiondefs>

 <query connection="foo_connection">
        select my_col from my_tbl
 </query>
</page>




this is the style sheet:


<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns="http://www.w3.org/TR/xhtml1/strict">
  <xsl:output method="html" indent="yes" doctype-public="-//W3C//DTD
HTML 4.0 Transitional//EN"/>



  <xsl:template match="page">
        <HTML><BODY>
        <TITLE><xsl:value-of select="title"/></TITLE>
                Hello World
        </BODY></HTML>
  </xsl:template>
</xsl:stylesheet>







Thanks all!

(BTW, I am new to this list.. and I must say I am VERY excited about
this technology as I am sure you all are!)
:-)



.mark

Re: Hello all, quick question

Posted by Mark Berry <ma...@shareaphoto.com>.
The <autoCommit> tags where carnage of my testing.   It didn't make a
difference.


I didn't do anything special to the configuration .. or specify that
transactions where enabled.... etc.

I even installed a fresh build of MySQL on the system... and you can see the
test code..


Thanks...


.mark


OD wrote:

> Hi,
>
> Quick answer, I haven't had a chance to verify this.
> Last time I checked, the stable release of MySql didn't support
> transactions...
> Although you have
> <autoCommit>false</autoCommit>
> in your xml file, looking at the first error line suggests that its still
> trying to use transactions.
> I'd try removing the <autoCommit> tag and see if it works then.
>
> I've never seen or used the <autoCommit> tag and MySql/Cocoon works fine for
> me.
>
> Corey O'Donovan
>
> ----- Original Message -----
> From: Mark Berry <ma...@shareaphoto.com>
> To: <co...@xml.apache.org>
> Sent: Monday, August 14, 2000 4:52 PM
> Subject: Hello all, quick question
>
> > Hi,
> >
> > I am dabbeling w/Cocoon right now and am having a strange problem ..
> >
> > I am running Tomcat w/the latest stable build of MySQL and latest stable
> > release of Cocoon.
> >
> >
> > This is the error that I am getting:
> >
> > java.sql.SQLException: Can't call commit when autocommit=true
> >         at org.gjt.mm.mysql.Connection.rollback(Connection.java)
> >         at
> >
> org.apache.cocoon.processor.sql.SQLProcessor.processQuery(SQLProcessor.java:
> 298)
> >
> >         at
> >
> org.apache.cocoon.processor.sql.SQLProcessor.process(SQLProcessor.java:140)
> >
> >         at org.apache.cocoon.Engine.handle(Engine.java:283)
> >         at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:368)
> >
> >         at org.apache.tomcat.core.Handler.service(Handler.java:261)
> >         at
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:356)
> >         at
> >
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:72
> 0)
> >
> >         at
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:666)
> >         at
> >
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:194)
> >
> >         at
> > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
> >
> >         at
> > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> >
> >         at java.lang.Thread.run(Thread.java:475)
> >
> >
> >
> >
> >
> > Here is my XML code:
> >
> >
> > <?xml version="1.0"?>
> >
> > <?cocoon-process type="sql"?>
> > <?xml-stylesheet href="db-ss.xsl" type="text/xsl"?>
> > <?cocoon-process type="xslt"?>
> >
> > <page>
> >  <title>Database Tests</title>
> >  <connectiondefs>
> >   <autoCommit>false</autoCommit>
> >   <connection name="foo_connection">
> >    <driver>org.gjt.mm.mysql.Driver</driver>
> >    <dburl>jdbc:mysql://localhost/mydb</dburl>
> >    <username>myname</username>
> >    <password>mypasswd</password>
> >   </connection>
> >  </connectiondefs>
> >
> >  <query connection="foo_connection">
> >         select my_col from my_tbl
> >  </query>
> > </page>
> >
> >
> >
> >
> > this is the style sheet:
> >
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <xsl:stylesheet version="1.0"
> >                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >                 xmlns="http://www.w3.org/TR/xhtml1/strict">
> >   <xsl:output method="html" indent="yes" doctype-public="-//W3C//DTD
> > HTML 4.0 Transitional//EN"/>
> >
> >
> >
> >   <xsl:template match="page">
> >         <HTML><BODY>
> >         <TITLE><xsl:value-of select="title"/></TITLE>
> >                 Hello World
> >         </BODY></HTML>
> >   </xsl:template>
> > </xsl:stylesheet>
> >
> >
> >
> >
> >
> >
> >
> > Thanks all!
> >
> > (BTW, I am new to this list.. and I must say I am VERY excited about
> > this technology as I am sure you all are!)
> > :-)
> >
> >
> >
> > .mark
> >
>
> ----------------------------------------------------------------------------
> ----
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

Re: Hello all, quick question

Posted by OD <od...@feersumendjinns.com>.
Hi,

Quick answer, I haven't had a chance to verify this.
Last time I checked, the stable release of MySql didn't support
transactions...
Although you have
<autoCommit>false</autoCommit>
in your xml file, looking at the first error line suggests that its still
trying to use transactions.
I'd try removing the <autoCommit> tag and see if it works then.

I've never seen or used the <autoCommit> tag and MySql/Cocoon works fine for
me.

Corey O'Donovan

----- Original Message -----
From: Mark Berry <ma...@shareaphoto.com>
To: <co...@xml.apache.org>
Sent: Monday, August 14, 2000 4:52 PM
Subject: Hello all, quick question


> Hi,
>
> I am dabbeling w/Cocoon right now and am having a strange problem ..
>
> I am running Tomcat w/the latest stable build of MySQL and latest stable
> release of Cocoon.
>
>
> This is the error that I am getting:
>
> java.sql.SQLException: Can't call commit when autocommit=true
>         at org.gjt.mm.mysql.Connection.rollback(Connection.java)
>         at
>
org.apache.cocoon.processor.sql.SQLProcessor.processQuery(SQLProcessor.java:
298)
>
>         at
>
org.apache.cocoon.processor.sql.SQLProcessor.process(SQLProcessor.java:140)
>
>         at org.apache.cocoon.Engine.handle(Engine.java:283)
>         at org.apache.cocoon.Cocoon.service(Cocoon.java:145)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:368)
>
>         at org.apache.tomcat.core.Handler.service(Handler.java:261)
>         at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:356)
>         at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:72
0)
>
>         at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:666)
>         at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:194)
>
>         at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
>
>         at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>
>         at java.lang.Thread.run(Thread.java:475)
>
>
>
>
>
> Here is my XML code:
>
>
> <?xml version="1.0"?>
>
> <?cocoon-process type="sql"?>
> <?xml-stylesheet href="db-ss.xsl" type="text/xsl"?>
> <?cocoon-process type="xslt"?>
>
> <page>
>  <title>Database Tests</title>
>  <connectiondefs>
>   <autoCommit>false</autoCommit>
>   <connection name="foo_connection">
>    <driver>org.gjt.mm.mysql.Driver</driver>
>    <dburl>jdbc:mysql://localhost/mydb</dburl>
>    <username>myname</username>
>    <password>mypasswd</password>
>   </connection>
>  </connectiondefs>
>
>  <query connection="foo_connection">
>         select my_col from my_tbl
>  </query>
> </page>
>
>
>
>
> this is the style sheet:
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <xsl:stylesheet version="1.0"
>                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                 xmlns="http://www.w3.org/TR/xhtml1/strict">
>   <xsl:output method="html" indent="yes" doctype-public="-//W3C//DTD
> HTML 4.0 Transitional//EN"/>
>
>
>
>   <xsl:template match="page">
>         <HTML><BODY>
>         <TITLE><xsl:value-of select="title"/></TITLE>
>                 Hello World
>         </BODY></HTML>
>   </xsl:template>
> </xsl:stylesheet>
>
>
>
>
>
>
>
> Thanks all!
>
> (BTW, I am new to this list.. and I must say I am VERY excited about
> this technology as I am sure you all are!)
> :-)
>
>
>
> .mark
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org