You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by CHERVIRALA Srinivas / FTR&D / US <sr...@rd.francetelecom.com> on 2002/03/02 04:37:34 UTC
[HELP] Cocoon 2.0 - Oracle DB connection problems...
Hi.
I am facing problem in accessing the Oracle DB.
My Environment:
----------------------------------------------------------------------------
---------------------------------------------------------
Win NT 4.0 Client
Apache Tomcat 4.0.2 (Standalone)
Cocoon 2.0
Oracle 8.1.6 Client
*Oracle 8.1.6 Server (Running under different machine in the network)
----------------------------------------------------------------------------
---------------------------------------------------------
I copied Oracle database classes12.zip and classes111.zip files to
\cocoon\web-inf\lib and renamed them as jar files.
Error:
----------------------------------------------------------------------------
---------------------------------------------------------
The org.apache.cocoon.www.sitemap_xmap notifies that
org.apache.cocoon.ProcessingException says:
Exception in ServerPagesGenerator.generate()
More precisely:
org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not get
the datasource
org.apache.avalon.excalibur.datasource.NoAvailableConnectionException: There
are no connections in the pool, check your settings.
Original exception : java.lang.RuntimeException: Could not get the
datasource
org.apache.avalon.excalibur.datasource.NoAvailableConnectionException: There
are no connections in the pool, check your settings.
Full Exception chain stacktrace:
at
org.apache.cocoon.www.docs.samples.xsp.esql_xsp.generate(esql_xsp.java:277)
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:226)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:209)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:355)
at org.apache.cocoon.www.sitemap_xmap.matchN104AD(sitemap_xmap.java:6239)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:3001)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2426)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:180)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:127)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:144)
at org.apache.cocoon.Cocoon.process(Cocoon.java:582)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:795)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
at java.lang.Thread.run(Thread.java:484)
----------------------------------------------------------------------------
---------------------------------------------------------
For your reference I am giving following file contents..
My Web.xml file contains:
----------------------------------------------------------------------------
---------------------------------------------------------
<init-param>
<param-name>load-class</param-name>
<param-value>
<!-- For IBM WebSphere:
com.ibm.servlet.classloader.Handler -->
<!-- For Database Driver: -->
org.hsqldb.jdbcDriver
<!-- For Oracle Database Driver: -->
oracle.jdbc.driver.OracleDriver
<!-- For parent ComponentManager sample:
org.apache.cocoon.samples.parentcm.Configurator
-->
</param-value>
</init-param>
----------------------------------------------------------------------------
--------------------------------------
My Cocoon.xconf file contains::
----------------------------------------------------------------------------
--------------------------------------
<datasources>
<jdbc name="personnel" logger="core.datasources.personnel">
<!--
If you have an Oracle database, and are using the the
pool-controller below, you should add the attribute
"oradb" and set it to true.
<pool-controller min="5" max="10" oradb="true"/>
That way the test to see if the server has disconnected
the JdbcConnection will function properly.
-->
<pool-controller min="5" max="10"/>
<!--
If you need to ensure an autocommit is set to true or
false, then create the "auto-commit" element below.
<auto-commit>false</auto-commit>
The default is true.
-->
<dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
<user>sa</user>
<password></password>
</jdbc>
<jdbc name="MyOrclConn">
<pool-controller min="5" max="10" oradb="true"/>
<auto-commit>true</auto-commit>
<dburl>jdbc:oracle:thin://u-oracleserver:1521</dburl>
<user>test</user>
<password>test</password>
</jdbc>
</datasources>
----------------------------------------------------------------------------
------------------------------------------
My Sitemap.xmap file contains:
----------------------------------------------------------------------------
------------------------------------------
<map:parameter name="use-connection" value="MyOrclConn"/>
----------------------------------------------------------------------------
------------------------------------------
My esql.xsp file: (I made simple changes in sample esql.xsp file)
----------------------------------------------------------------------------
------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
<page>
<title>A Database Driven XSP Page</title>
<content>
<esql:connection>
<esql:pool>MyOrclConn</esql:pool>
<esql:execute-query>
<esql:query>select * from test</esql:query>
<esql:results>
<esql:row-results>
<para><esql:get-string column="name"/></para>
<esql:get-columns/>
</esql:row-results>
</esql:results>
</esql:execute-query>
</esql:connection>
</content>
</page>
</xsp:page>
----------------------------------------------------------------------------
------------------------------------------
I am able to connect to the Oracle server in the network from my machine
using Oracle client tool.
Any assistance in this regard will be highly appreciated.
Thanks
Srinivas Chervirala
Re: [HELP] Cocoon 2.0 - Oracle DB connection problems...
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 01.Mar.2002 -- 07:37 PM, CHERVIRALA Srinivas / FTR&D / US wrote:
>
> Hi.
>
> I am facing problem in accessing the Oracle DB.
>
> My Environment:
> ----------------------------------------------------------------------------
> ---------------------------------------------------------
> Win NT 4.0 Client
> Apache Tomcat 4.0.2 (Standalone)
There has been problems reported running Cocoon on top of Tomcat 4.0.2
Try 4.0.1 instead.
If that doesn't help, find the portion in core.log (or any other log) that
shows the initialization of your connection pool and post it here. Search
for org.apache.avalon.excalibur.datasource or the name of your driver class.
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/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>