SQL Connection throws exception
Hi, i need your help: when trying to execute an SQL Statement cocoon throws an exception. The JDBC driver is working (i can see coocoon connect to the database and i can access the database via JDBC from within other applications. Any hints and thoughts about what i could try to get the connection to work are welcome. This is my JDBC definition: jdbc name=SQLBase pool-controller max=10 min=5/ dburljdbc:sqlbase://xxx.xxx.xxx.xxx:2155/mydatabase/dburl usersysadm/user passwordx/password /jdbc This is my map:match: map:match pattern=testdb map:generate src=testdb.xml/ map:transform type=sql map:parameter name=use-connection value=SQLBase/ /map:transform map:serialize type=xml/ /map:match This is my file testdb.xml: ?xml version=1.0 encoding=UTF-8? xml xmlns:sql=http://apache.org/cocoon/SQL/2.0; sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0; sql:query select name from user /sql:query /sql:execute-query /xml And this is the result: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 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:2397) 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:171) 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) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java) 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) root cause java.lang.AbstractMethodError at org.apache.avalon.excalibur.datasource.Jdbc3Connection.prepareStatement(Jdbc3Connection.java:167) at org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer.java:1096) at org.apache.cocoon.transformation.SQLTransformer.executeQuery(SQLTransformer.java:305) at org.apache.cocoon.transformation.SQLTransformer.endExecuteQueryElement(SQLTransformer.java:462) at org.apache.cocoon.transformation.SQLTransformer.endTransformingElement(SQLTransformer.java:769) at org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractSAXTransformer.java:358) at
Re: SQL Connection throws exception
[EMAIL PROTECTED] wrote: Hi, i need your help: when trying to execute an SQL Statement cocoon throws an exception. I bet on JDK mismatch, Please use Cocoon with the JDK it is intended to use with. I.e., cocoon-2.0.3-vm14-bin.tar.gz http://xml.apache.org/cocoon/dist/cocoon-2.0.3-vm14-bin.tar.gz should be used with JDK1.4, and cocoon-2.0.3-bin.tar.gz http://xml.apache.org/cocoon/dist/cocoon-2.0.3-bin.tar.gz for all others (pre-1.4). See http://xml.apache.org/cocoon/dist/ Vadim The JDBC driver is working (i can see coocoon connect to the database and i can access the database via JDBC from within other applications. Any hints and thoughts about what i could try to get the connection to work are welcome. This is my JDBC definition: jdbc name=SQLBase pool-controller max=10 min=5/ dburljdbc:sqlbase://xxx.xxx.xxx.xxx:2155/mydatabase/dburl usersysadm/user passwordx/password /jdbc This is my map:match: map:match pattern=testdb map:generate src=testdb.xml/ map:transform type=sql map:parameter name=use-connection value=SQLBase/ /map:transform map:serialize type=xml/ /map:match This is my file testdb.xml: ?xml version=1.0 encoding=UTF-8? xml xmlns:sql=http://apache.org/cocoon/SQL/2.0; sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0; sql:query select name from user /sql:query /sql:execute-query /xml And this is the result: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. ... root cause java.lang.AbstractMethodError at org.apache.avalon.excalibur.datasource.Jdbc3Connection.prepareStatement(Jdbc3Connection.java:167) at org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer.java:1096) ... thank you Joern - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]