You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by gi...@tiscali.it on 2002/02/28 12:24:12 UTC

Help connection Cocoon2 to Oracle8

Hello,
I am not able to connect to Oracle8i database.

  Error creating the resource 
  Exception in ServerPagesGenerator.generate() 
  details 
  from  
  source org.apache.cocoon.ProcessingException 
description org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate():
java.lang.RuntimeException: Could not get the datasource java.sql.SQLException:
There are no connections in the pool, check your settings.
 
  extra info 
org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate():
java.lang.RuntimeException: Could not get the datasource java.sql.SQLException:
There are no connections in the pool, check your settings.
 
 org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate():
java.lang.RuntimeException: Could not get the datasource java.sql.SQLException:
There are no connections in the pool, check your settings. 
	at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:212)

	at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:210)

	at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:359)

	at org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400421(sitemap_xmap.java:6911)

	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2919) 
	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2469) 
	at org.apache.cocoon.sitemap.Handler.process(Handler.java:163) 
	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114) 
	at org.apache.cocoon.Cocoon.process(Cocoon.java:514) 
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) 
	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:243)

	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

	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.java:215)

	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

	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:2366)

	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)

	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

	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:163)

	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

	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:1005)

	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098)

	at java.lang.Thread.run(Unknown Source) 
java.lang.RuntimeException: Could not get the datasource java.sql.SQLException:
There are no connections in the pool, check your settings. 
	
Sitemap.xmap
<!--  Prova Prova Prova Prova Prova Prova Prova Prova Prova -->
  <map:match pattern="visualizza/*">
    <map:generate type="serverpages" src="visualizza/{1}.xsp"/>
       <map:transform type="sql">
       <map:parameter name="use-connection" value="test_oracle_pool"/>
       </map:transform>
   <!-- <map:transform src="visualizza/dynamica-page2html.xsl">
        <map:parameter name="view-source" value="visualizza/{1}.xsp"/>
    </map:transform>
   -->

    <map:serialize/>
   </map:match>
<!--  Prova Prova Prova Prova Prova Prova Prova Prova Prova -->


Coccon.xconf

   <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>
  <!--  <component-instance name="test_oracle_pool" class="org.apache.avalon.util.datasource.JdbcDataSource">
-->  
   <jdbc name="test_oracle_pool"> 
      <!-- Don't forget the oradb parameter for Oracle!!! --> 
	<pool-controller min="5" max="10" oradb="true"/>
	<dburl>jdbc:oracle:thin:@server:1521:oras</dburl>
	<user>d</user> 
	<password>g</password> 
   </jdbc> 
     <!--  </component-instance>   -->
</datasources>



web.xml
      <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>

The database driver is classes102.zip and I am able to connect to the same
database with same driver with standalone java application.
Environment is Tomcat 4,  C2 & windows2000
Any help on this will be highly appreciated

Thanks




__________________________________________________________________
Abbonati a Tiscali!
Con Tiscali By Phone puoi anche ascoltare ed inviare email al telefono.
Chiama Tiscali By Phone all' 892 800        http://byphone.tiscali.it





---------------------------------------------------------------------
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>


Re: Help connection Cocoon2 to Oracle8

Posted by Martin Holz <ho...@fiz-chemie.de>.
giuseppe.devincenzi@tiscali.it wrote:
> Hello,
> I am not able to connect to Oracle8i database.

> The database driver is classes102.zip and I am able to connect to the same
> database with same driver with standalone java application.
> Environment is Tomcat 4,  C2 & windows2000

Do you use the same java compiler and vm for cocoon and the standalone 
program ? I had some trouble with Oracle and jdk 1.4 .

--
Martin Holz  
<ho...@fiz-chemie.de> 


---------------------------------------------------------------------
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>


RE: Help connection Cocoon2 to Oracle8

Posted by Luca Morandini <lu...@tin.it>.
> -----Original Message-----
> From: giuseppe.devincenzi@tiscali.it
> [mailto:giuseppe.devincenzi@tiscali.it]
> Sent: Thursday, February 28, 2002 12:24 PM
> To: cocoon-users@xml.apache.org
> Subject: Help connection Cocoon2 to Oracle8

> The database driver is classes102.zip and I am able to connect to the same
> database with same driver with standalone java application.
> Environment is Tomcat 4,  C2 & windows2000
> Any help on this will be highly appreciated

It should be classes12.zip... a typo in the message maybe ?

Anyhow, I use Oracle 8.1.7, on: Windows 2000, Tomcat 4.0.1 and Cocoon 2.0
(and it works).

These are the parameters I use:

web.xml (the one located under $TOMCAT_HOME\webassp\cocoon\WEB-INF
    <init-param>
      <param-name>load-class</param-name>
      <param-value>
  		oracle.jdbc.driver.OracleDriver
      </param-value>
    </init-param>

cocoon.xconf
<datasources>
	<jdbc name="noria">
		<pool-controller min="5" max="10" oradb="true"/>
	    <dburl>jdbc:oracle:thin:@localhost:1521:ORCL3</dburl>
		<user>noria</user>
		<password>noria</password>
	</jdbc>
</datasources>

Where ORCL3 is the instance's name

Best regards,

---------------------------------------------
               Luca Morandini
               GIS Consultant
              lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------



---------------------------------------------------------------------
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>