cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Berry <m...@shareaphoto.com>
Subject Hello all, quick question
Date Mon, 14 Aug 2000 15:52:11 GMT
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

Mime
View raw message