i had the esql:pool tag in the wrong place.
everything okay now.
Peter Choe wrote:
I am just starting out using cocoon and am trying to use esql database tags.
i have cocoon 2.0.4 running on tomcat 4.1.18 and postgresql 7.3.
i have configured the cocoonc.xconf with the following:
<jdbc name="directory-pool"> <pool-controller min="1" max="60" /> <dburl>jdbc:postgresql://localhost/directory</dburl> <user>user_id</user> <password>mypass</password> </jdbc>
and set-up the web.xml with:
<init-param> <param-name>load-class</param-name> <param-value> <!-- For IBM WebSphere: com.ibm.servlet.classloader.Handler -->
<!-- For Database Driver: --> org.hsqldb.jdbcDriver org.postgresql.Driver <!-- For parent ComponentManager sample: org.apache.cocoon.samples.parentcm.Configurator --> </param-value>
i have an xsp that should connect to the database and create an xml file:
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2">
<records> <esql:connection> <esql:execute-query> <esql:pool>directory-pool</esql:pool> <esql:query>SELECT * FROM department</esql:query> <esql:results> <esql:row-results> <record><esql:get-columns /></record> </esql:row-results> </esql:results> <esql:update-results /> <esql:no-results /> <esql:error-results /> </esql:execute-query> </esql:connection> </records> </xsp:page>
but when i try to get the xml document, i get the following error in the access.log
ERROR (2003-08-18) 11:34.19:920 [access] (/test/directory/directory.xml) Thread-8/CocoonServlet: Problem with Cocoon servlet
org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.RuntimeException: Error opening connection to dburl: : The user property is missing. It is mandatory.
at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:270)
at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250)
at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:395)
at org.apache.cocoon.www.sitemap_xmap.matchN1007C(sitemap_xmap.java:878)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:569)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:415)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:152)
at org.apache.cocoon.Cocoon.process(Cocoon.java:579)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1043)
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:2415)
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:432)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
as far as i can tell i have the user set up in the cocoon.xconf.
what user property is the error referring to and where should i add it?
Peter Choe
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
