cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: command line Oracle connection
Date Wed, 24 Sep 2003 05:12:23 GMT
I have never really tried to use Cocoon with a database, whether CLI or 
servlet.

I did however come across the fact that the web.xml option to load a 
driver class was missing from the CLI, so therefore it _could not_ work 
with databases.

I added the code from the servlet into the CLI, but have not tested it, 
as I haven't had any database connections to test it with, and have not 
yet had any reports of it working or not.

Have you successfully used the CLI to render non SQL pages?

Are you prepared to help debug this? If so, I will do my best to guide 
you through, which would then make this feature available to all who 
want to use the CLI with databases.

With best wishes,

Upayavira

David Zhu wrote:

>Hello everyone,
>
>I have a question regarding connection to Oracle
>database when using CLI. I have a project that needs
>to generate some static pages from an Oracle db, I am
>able to do that throught browser, but got SQLexception
>when I used Command line interface. Is there any
>difference between servlet and CLI regarding sql
>connection? and how do I get the configuration right?
>any help will be greatly appreciated.
>
>my cocoon version is 2.1.1 (the last, I just
>downloaded it a couple of days ago), the OS is
>windowsXP with java SDK 1.4.1. cocoon.xconf and
>web.xml are attached. 
>
>I used this command: 
>E:\temp\new\cocoon-2.1.1>cocoon.bat cli -C
>build\webapp\web-inf\cocoon.xconf -d dest -c
>build\webapp -u DEBUG -L
>oracle.jdbc.driver.OracleDriver sqlou
>t.xml
>
>The java exception looks like:
>
>Cannot find CatalogManager.properties
>ERROR   2003-09-23 16:53:58.916 [sitemap.] (): Caught
>a SQLException
>java.sql.SQLException: Failed to obtain connection.
>Made 5 attempts with 5000ms interval
>        at
>org.apache.cocoon.transformation.SQLTransformer$Query.getConnection(SQLTransformer.java:1007)
>        at
>org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer.java:1061)
>        at
>org.apache.cocoon.transformation.SQLTransformer.executeQuery(SQLTransformer.java:309)
>        at
>org.apache.cocoon.transformation.SQLTransformer.endExecuteQueryElement(SQLTransformer.java:466)
>        at
>org.apache.cocoon.transformation.SQLTransformer.endTransformingElement(SQLTransformer.java:747)
>        at
>org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractSAXTransformer.java:358)
>        at
>org.apache.cocoon.components.sax.XMLTeePipe.endElement(XMLTeePipe.java:124)
>        at
>org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
>Source)
>        at
>org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
>Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>Source)
>        at
>org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>Source)
>        at
>org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>Source)
>        at
>org.apache.xerces.parsers.XMLParser.parse(Unknown
>Source)
>        at
>org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>Source)
>        at
>org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:318)
>        at
>org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:337)
>        at
>org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:229)
>        at
>org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:139)
>        at
>org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:272)
>
>        at
>org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:492)
>        at
>org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
>        at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
>        at
>org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
>        at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>        at
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:164)
>        at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>        at
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161)
>        at
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:363)
>        at
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:316)
>        at
>org.apache.cocoon.Cocoon.process(Cocoon.java:637)
>        at
>org.apache.cocoon.bean.CocoonWrapper.processLenient(CocoonWrapper.java:609)
>        at
>org.apache.cocoon.bean.CocoonWrapper.getType(CocoonWrapper.java:596)
>        at
>org.apache.cocoon.bean.CocoonBean.processTarget(CocoonBean.java:394)
>        at
>org.apache.cocoon.bean.CocoonBean.process(CocoonBean.java:294)
>        at org.apache.cocoon.Main.main(Main.java:392)
>        at
>sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>Method)
>        at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at
>java.lang.reflect.Method.invoke(Method.java:324)
>        at Loader.invokeMain(Unknown Source)
>        at Loader.run(Unknown Source)
>        at Loader.main(Unknown Source)
>ERROR   2003-09-23 16:54:26.095 [sitemap.] (): Caught
>a SQLException
>java.sql.SQLException: Failed to obtain connection.
>Made 5 attempts with 5000ms interval
>        at
>org.apache.cocoon.transformation.SQLTransformer$Query.getConnection(SQLTransformer.java:1007)
>        at
>org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer.java:1061)
>        at
>org.apache.cocoon.transformation.SQLTransformer.executeQuery(SQLTransformer.java:309)
>        at
>org.apache.cocoon.transformation.SQLTransformer.endExecuteQueryElement(SQLTransformer.java:466)
>        at
>org.apache.cocoon.transformation.SQLTransformer.endTransformingElement(SQLTransformer.java:747)
>        at
>org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractSAXTransformer.java:358)
>        at
>org.apache.cocoon.components.sax.XMLTeePipe.endElement(XMLTeePipe.java:124)
>        at
>org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
>Source)
>        at
>org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
>Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>Source)
>        at
>org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>Source)
>        at
>org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>Source)
>        at
>org.apache.xerces.parsers.XMLParser.parse(Unknown
>Source)
>        at
>org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>Source)
>        at
>org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:318)
>        at
>org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:337)
>        at
>org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:229)
>        at
>org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:139)
>        at
>org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:272)
>
>        at
>org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:492)
>        at
>org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
>        at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
>        at
>org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
>        at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>        at
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:164)
>        at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>        at
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161)
>        at
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:363)
>        at
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:316)
>        at
>org.apache.cocoon.Cocoon.process(Cocoon.java:637)
>        at
>org.apache.cocoon.bean.CocoonWrapper.processLenient(CocoonWrapper.java:609)
>        at
>org.apache.cocoon.bean.CocoonWrapper.getType(CocoonWrapper.java:596)
>        at
>org.apache.cocoon.bean.CocoonBean.processTarget(CocoonBean.java:394)
>        at
>org.apache.cocoon.bean.CocoonBean.process(CocoonBean.java:294)
>        at org.apache.cocoon.Main.main(Main.java:392)
>        at
>sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>Method)
>        at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at
>java.lang.reflect.Method.invoke(Method.java:324)
>        at Loader.invokeMain(Unknown Source)
>        at Loader.run(Unknown Source)
>        at Loader.main(Unknown Source)
>
>
>
>======
>
>Please help, I am stuck here!
>
>Clay
>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>http://sitebuilder.yahoo.com
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>



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


Mime
View raw message