You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Samuel Bruce <bp...@yahoo.com> on 2002/10/25 06:38:25 UTC
mod-db action yields 'CALL IDENTITY()' MySQL syntax error
Hello,
I'm using the latest CVS, TC 4.1.12, JDK 1.4.01.
The mod-db action inserts the first row correctly, but
fails on the second row insert. It seems to also fail
attempting to rollback.
Anything you can do to help is appreciated.
Here is a snippet from my sitemap.log:
DEBUG (2002-10-24) 23:56.37:359
[sitemap.action.mod-db-add] ()
Thread-10/AbstractComplementaryConfigurableAction:
(Re)Loading context://resources/dbgx.xml
DEBUG (2002-10-24) 23:56.37:379
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: modeTypes : {2=request-attr,
1=others, 0=autoincr}
DEBUG (2002-10-24) 23:56.37:379
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=0
DEBUG (2002-10-24) 23:56.37:379
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was
"autoincr" returning "autoincr"
DEBUG (2002-10-24) 23:56.37:379
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=1
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was "others"
returning "all"
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=2
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was "others"
returning "all"
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=3
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was "others"
returning "all"
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: query: INSERT INTO gx (oid,
aid, gid) VALUES (?, ?, ?)
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Trying to set column gx.oid
from request-param using getAttribute method
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.oid [0] 1
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Trying to set column
grpmbrs.abid from request-param using getAttribute
method
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.aid [0] 30
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Trying to set column
grpmbrs.grpid from request-param using
getAttributeValues method
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.gid [0] 1
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.gid [1] 2
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: ====> row no. 0
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAddAction: Automatically setting key
DEBUG (2002-10-24) 23:56.37:389
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.oid[0] to
1
DEBUG (2002-10-24) 23:56.37:409
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.aid[0] to
30
DEBUG (2002-10-24) 23:56.37:409
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.gxid[0] to
1
DEBUG (2002-10-24) 23:56.37:509
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Rolling back transaction.
Caused by Syntax error or access violation: You have
an error in your SQL syntax near 'CALL IDENTITY()' at
line 1
DEBUG (2002-10-24) 23:56.37:520
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: There was an error rolling
back the transaction
java.sql.SQLException: General error: Warning: Some
non-transactional changed tables couldn't be rolled
back
at
org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
at
org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:550)
at
org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java:635)
at
org.gjt.mm.mysql.Connection.execSQL(Connection.java:882)
at
org.gjt.mm.mysql.Connection.execSQL(Connection.java:815)
at
org.gjt.mm.mysql.Connection.rollback(Connection.java:551)
at
org.apache.avalon.excalibur.datasource.Jdbc3Connection.rollback(Jdbc3Connection.java:92)
at
org.apache.cocoon.acting.modular.DatabaseAction.act(DatabaseAction.java:778)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActionSetNode.call(ActionSetNode.java:176)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActSetNode.invoke(ActSetNode.java:111)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:143)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308)
at org.apache.cocoon.Cocoon.process(Cocoon.java:595)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1034)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)
DEBUG (2002-10-24) 23:56.37:520 [sitemap] ()
Thread-10/DefaultComponentFactory: ComponentFactory
decommissioning instance of org.apache.cocoon.acting.modular.DatabaseAddAction.
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: mod-db action yields 'CALL IDENTITY()' MySQL syntax error
Posted by Samuel Bruce <bp...@yahoo.com>.
Thanks very much. It worked like a charm.
This configuration wasn't apparent to me from reading
the documentation. Thanks for making it clear.
--- Christian Haul
<ha...@dvs1.informatik.tu-darmstadt.de> wrote:
> On 24.Oct.2002 -- 09:38 PM, Samuel Bruce wrote:
> > Hello,
> >
> > I'm using the latest CVS, TC 4.1.12, JDK 1.4.01.
> >
> > The mod-db action inserts the first row correctly,
> but
> > fails on the second row insert. It seems to also
> fail
> > attempting to rollback.
> >
> > Anything you can do to help is appreciated.
>
> > Thread-10/DatabaseAction: Rolling back
> transaction.
> > Caused by Syntax error or access violation: You
> have
> > an error in your SQL syntax near 'CALL IDENTITY()'
> at
> > line 1
> > DEBUG (2002-10-24) 23:56.37:520
> > [sitemap.action.mod-db-add] ()
> > Thread-10/DatabaseAction: There was an error
> rolling
> > back the transaction
> > java.sql.SQLException: General error: Warning:
> Some
> > non-transactional changed tables couldn't be
> rolled
> > back
> > at
>
> >
>
org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
> > at
>
> So, you are trying to use the autoincrement module
> for HSQLDB with
> MySQL. That just won't work. Please use the MySQL
> one. For this, you
> need to edit the cocoon.xconf and uncomment the
> correct module and
> comment out the hsqldb one. mod-db uses the one with
> shorthand "auto"
> unless instructed otherwise.
>
> Chris.
> --
> C h r i s t i a n H a u l
> haul@informatik.tu-darmstadt.de
> fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9
> 6856 335A 9E08
>
>
>
---------------------------------------------------------------------
> Please check that your question has not already
> been answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:
> <co...@xml.apache.org>
> For additional commands, e-mail:
> <co...@xml.apache.org>
>
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: mod-db action yields 'CALL IDENTITY()' MySQL syntax error
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 24.Oct.2002 -- 09:38 PM, Samuel Bruce wrote:
> Hello,
>
> I'm using the latest CVS, TC 4.1.12, JDK 1.4.01.
>
> The mod-db action inserts the first row correctly, but
> fails on the second row insert. It seems to also fail
> attempting to rollback.
>
> Anything you can do to help is appreciated.
> Thread-10/DatabaseAction: Rolling back transaction.
> Caused by Syntax error or access violation: You have
> an error in your SQL syntax near 'CALL IDENTITY()' at
> line 1
> DEBUG (2002-10-24) 23:56.37:520
> [sitemap.action.mod-db-add] ()
> Thread-10/DatabaseAction: There was an error rolling
> back the transaction
> java.sql.SQLException: General error: Warning: Some
> non-transactional changed tables couldn't be rolled
> back
> at
> org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
> at
So, you are trying to use the autoincrement module for HSQLDB with
MySQL. That just won't work. Please use the MySQL one. For this, you
need to edit the cocoon.xconf and uncomment the correct module and
comment out the hsqldb one. mod-db uses the one with shorthand "auto"
unless instructed otherwise.
Chris.
--
C h r i s t i a n H a u l
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>