You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Giuseppe De Vincenzi <gi...@tiscalinet.it> on 2002/02/27 17:55:35 UTC

Help connect Cocoon2 to Oracle8

I am not able to connect to Oracle8i database.Exception
states that could not connect to datasource & you cannot get a poolable
before the pool is initialized.

type internal-server-error

message Error in sitemap configuration : Could not set up Component for
hint: add-employee

description org.apache.avalon.framework.configuration.ConfigurationExcept=
ion:
Error in sitemap configuration : Could not set up Component for hint: add=
-employee

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

request-uri

/cocoon/visualizza/prova

exception

org.apache.avalon.framework.configuration.ConfigurationException: Error
in sitemap configuration : Could not set up Component for hint: add-emplo=
yee

path-info

visualizza/prova

stacktrace

org.apache.avalon.framework.configuration.ConfigurationException: Error
in sitemap configuration : Could not set up Component for hint: add-emplo=
yee

Coccon.xconf

 <datasources>
  <component-instance name=3D"test_oracle_pool" class=3D"org.apache.avalo=
n.util.datasource.JdbcDataSource">
   <!--   <jdbc name=3D"test_oracle_pool">  -->
      <!-- Don't forget the oradb parameter for Oracle!!! --> 
<pool-controller min=3D"5" max=3D"10" oradb=3D"true"/>
<dburl>jdbc:oracle:thin:@server:oras</dburl>
<user>de</user> 
<password>gi</password> 
   <!--   </jdbc>   -->
  </component-instance> 


      <jdbc name=3D"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=3D"5" max=3D"10" oradb=3D"true"/>

      That way the test to see if the server has disconnected
      the JdbcConnection will function properly.
      -->
      <pool-controller min=3D"5" max=3D"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>   
</datasources>


web.xml
       <init-param>
       <param-name>load-class</param-name>
       <param-value>
        oracle.jdbc.driver.OracleDriveror
       </param-value>

The database driver is classes12.jar and I am able to connect to the same=

database with same driver with standalone java application.
Environment is Tomcat 4,  C2 & windows2000
Prior to this  I connected to mySql database sucessfully.

Any help on this will be highly appreciated

Thanks I am not able to connect to Oracle8i database.Exception
states that could not connect to datasource & you cannot get a poolable
before the pool is initialized.

type internal-server-error

message Error in sitemap configuration : Could not set up Component for
hint: add-employee

description org.apache.avalon.framework.configuration.ConfigurationExcept=
ion:
Error in sitemap configuration : Could not set up Component for hint: add=
-employee

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

request-uri

/cocoon/visualizza/prova

exception

org.apache.avalon.framework.configuration.ConfigurationException: Error
in sitemap configuration : Could not set up Component for hint: add-emplo=
yee

path-info

visualizza/prova

stacktrace

org.apache.avalon.framework.configuration.ConfigurationException: Error
in sitemap configuration : Could not set up Component for hint: add-emplo=
yee

Coccon.xconf

 <datasources>
  <component-instance name=3D"test_oracle_pool" class=3D"org.apache.avalo=
n.util.datasource.JdbcDataSource">
   <!--   <jdbc name=3D"test_oracle_pool">  -->
      <!-- Don't forget the oradb parameter for Oracle!!! --> 
<pool-controller min=3D"5" max=3D"10" oradb=3D"true"/>
<dburl>jdbc:oracle:thin:@server:oras</dburl>
<user>de</user> 
<password>gi</password> 
   <!--   </jdbc>   -->
  </component-instance> 


      <jdbc name=3D"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=3D"5" max=3D"10" oradb=3D"true"/>

      That way the test to see if the server has disconnected
      the JdbcConnection will function properly.
      -->
      <pool-controller min=3D"5" max=3D"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>   
</datasources>


web.xml
       <init-param>
       <param-name>load-class</param-name>
       <param-value>
        oracle.jdbc.driver.OracleDriveror
       </param-value>

The database driver is classes12.jar and I am able to connect to the same=

database with same driver with standalone java application.
Environment is Tomcat 4,  C2 & windows2000
Prior to this  I connected to mySql database sucessfully.

Any help on this will be highly appreciated 
<gi...@tiscalinet.it>
Thanks            





Re: Help connect Cocoon2 to Oracle8

Posted by yuryx <yu...@mobicomk.donpac.ru>.
Giuseppe De Vincenzi wrote:

> I am not able to connect to Oracle8i database.Exception
> states that could not connect to datasource & you cannot get a poolable
> before the pool is initialized.
>
> type internal-server-error
>
> message Error in sitemap configuration : Could not set up Component for
> hint: add-employee
>
> description org.apache.avalon.framework.configuration.ConfigurationExcept=
> ion:
> Error in sitemap configuration : Could not set up Component for hint: add=
> -employee
>
> sender org.apache.cocoon.servlet.CocoonServlet
>
> source Cocoon servlet
>
> request-uri
>
> /cocoon/visualizza/prova
>
> exception
>
> org.apache.avalon.framework.configuration.ConfigurationException: Error
> in sitemap configuration : Could not set up Component for hint: add-emplo=
> yee
>
> path-info
>
> visualizza/prova
>
> stacktrace
>
> org.apache.avalon.framework.configuration.ConfigurationException: Error
> in sitemap configuration : Could not set up Component for hint: add-emplo=
> yee
>
> Coccon.xconf
>
>  <datasources>
>   <component-instance name=3D"test_oracle_pool" class=3D"org.apache.avalo=
> n.util.datasource.JdbcDataSource">
>    <!--   <jdbc name=3D"test_oracle_pool">  -->
>       <!-- Don't forget the oradb parameter for Oracle!!! -->
> <pool-controller min=3D"5" max=3D"10" oradb=3D"true"/>
> <dburl>jdbc:oracle:thin:@server:oras</dburl>
> <user>de</user>
> <password>gi</password>
>    <!--   </jdbc>   -->
>   </component-instance>
>
>
>       <jdbc name=3D"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=3D"5" max=3D"10" oradb=3D"true"/>
>
>       That way the test to see if the server has disconnected
>       the JdbcConnection will function properly.
>       -->
>       <pool-controller min=3D"5" max=3D"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>  
> </datasources>
>
>
> web.xml
>        <init-param>
>        <param-name>load-class</param-name>
>        <param-value>
>         oracle.jdbc.driver.OracleDriveror
>        </param-value>
>
> The database driver is classes12.jar and I am able to connect to the same=
>
> database with same driver with standalone java application.
> Environment is Tomcat 4,  C2 & windows2000
> Prior to this  I connected to mySql database sucessfully.
>
> Any help on this will be highly appreciated
>
> Thanks I am not able to connect to Oracle8i database.Exception
> states that could not connect to datasource & you cannot get a poolable
> before the pool is initialized.
>
> type internal-server-error
>
> message Error in sitemap configuration : Could not set up Component for
> hint: add-employee
>
> description org.apache.avalon.framework.configuration.ConfigurationExcept=
> ion:
> Error in sitemap configuration : Could not set up Component for hint: add=
> -employee
>
> sender org.apache.cocoon.servlet.CocoonServlet
>
> source Cocoon servlet
>
> request-uri
>
> /cocoon/visualizza/prova
>
> exception
>
> org.apache.avalon.framework.configuration.ConfigurationException: Error
> in sitemap configuration : Could not set up Component for hint: add-emplo=
> yee
>
> path-info
>
> visualizza/prova
>
> stacktrace
>
> org.apache.avalon.framework.configuration.ConfigurationException: Error
> in sitemap configuration : Could not set up Component for hint: add-emplo=
> yee
>
> Coccon.xconf
>
>  <datasources>
>   <component-instance name=3D"test_oracle_pool" class=3D"org.apache.avalo=
> n.util.datasource.JdbcDataSource">
>    <!--   <jdbc name=3D"test_oracle_pool">  -->
>       <!-- Don't forget the oradb parameter for Oracle!!! -->
> <pool-controller min=3D"5" max=3D"10" oradb=3D"true"/>
> <dburl>jdbc:oracle:thin:@server:oras</dburl>
> <user>de</user>
> <password>gi</password>
>    <!--   </jdbc>   -->
>   </component-instance>
>
>
>       <jdbc name=3D"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=3D"5" max=3D"10" oradb=3D"true"/>
>
>       That way the test to see if the server has disconnected
>       the JdbcConnection will function properly.
>       -->
>       <pool-controller min=3D"5" max=3D"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>  
> </datasources>
>
>
> web.xml
>        <init-param>
>        <param-name>load-class</param-name>
>        <param-value>
>         oracle.jdbc.driver.OracleDriveror
>        </param-value>
>
> The database driver is classes12.jar and I am able to connect to the same=
>
> database with same driver with standalone java application.
> Environment is Tomcat 4,  C2 & windows2000
> Prior to this  I connected to mySql database sucessfully.
>
> Any help on this will be highly appreciated
>
> <giuseppe.devincenzi @tiscalinet.it <ma...@sogei.it>>
> Thanks           
>
>
>
Use in web.xml like:
   <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 parent ComponentManager sample:
        org.apache.cocoon.samples.parentcm.Configurator
        -->
    oracle.jdbc.driver.OracleDriver
      </param-value>
    </init-param>

in cocoon.xconf like:

 <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="someora">
      <pool-controller min="5" max="10" oradb="true"/>   
      <dburl>jdbc:oracle:thin:@somehost:1521:somesid</dburl>
      <user>user</user>
      <password>password</password>
    </jdbc>


  </datasources>

Regards,
Yury.


---------------------------------------------------------------------
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 connect Cocoon2 to Oracle8

Posted by Bert Van Kets <be...@visitronics.be>.
I had similar problems when trying to connect to a mySQL database.  I 
solved it this way:
- Downloaded a CVS HEAD.
- removed the hsqldbjar from the xml-cocoon2\lib\optional directory
- added my JDBC jar file in the xml-cocoon2\lib\optional directory
-  removed the xml-cocoon2\src\java\org\apache\cocoon\components\hsqldb 
directory
- replaced parameters in the database.properties file in the xml-cocoon2 
directory
- rebuild
- run

The easiest way to test the database is by modifying the 
cocoon\docs\samples\xsp\esql.xsp file to show some data present in the 
database.  Just modify the SQL query and the column name in the 
esql:get-string element.

This did the trick in my case.
Bert

At 17:55 27/02/2002 +0100, you wrote:
>I am not able to connect to Oracle8i database.Exception
>states that could not connect to datasource & you cannot get a poolable
>before the pool is initialized.
>
>type internal-server-error
>
>message Error in sitemap configuration : Could not set up Component for
>hint: add-employee
>
>description org.apache.avalon.framework.configuration.ConfigurationExcept=
>ion:
>Error in sitemap configuration : Could not set up Component for hint: add=
>-employee
>
>sender org.apache.cocoon.servlet.CocoonServlet
>
>source Cocoon servlet
>
>request-uri
>
>/cocoon/visualizza/prova
>
>exception
>
>org.apache.avalon.framework.configuration.ConfigurationException: Error
>in sitemap configuration : Could not set up Component for hint: add-emplo=
>yee
>
>path-info
>
>visualizza/prova
>
>stacktrace
>
>org.apache.avalon.framework.configuration.ConfigurationException: Error
>in sitemap configuration : Could not set up Component for hint: add-emplo=
>yee
>
>Coccon.xconf
>
>  <datasources>
>   <component-instance name=3D"test_oracle_pool" class=3D"org.apache.avalo=
>n.util.datasource.JdbcDataSource">
>    <!--   <jdbc name=3D"test_oracle_pool">  -->
>       <!-- Don't forget the oradb parameter for Oracle!!! -->
><pool-controller min=3D"5" max=3D"10" oradb=3D"true"/>
><dburl>jdbc:oracle:thin:@server:oras</dburl>
><user>de</user>
><password>gi</password>
>    <!--   </jdbc>   -->
>   </component-instance>
>
>
>       <jdbc name=3D"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=3D"5" max=3D"10" oradb=3D"true"/>
>
>       That way the test to see if the server has disconnected
>       the JdbcConnection will function properly.
>       -->
>       <pool-controller min=3D"5" max=3D"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>
></datasources>
>
>
>web.xml
>        <init-param>
>        <param-name>load-class</param-name>
>        <param-value>
>         oracle.jdbc.driver.OracleDriveror
>        </param-value>
>
>The database driver is classes12.jar and I am able to connect to the same=
>
>database with same driver with standalone java application.
>Environment is Tomcat 4,  C2 & windows2000
>Prior to this  I connected to mySql database sucessfully.
>
>Any help on this will be highly appreciated
>
>Thanks I am not able to connect to Oracle8i database.Exception
>states that could not connect to datasource & you cannot get a poolable
>before the pool is initialized.
>
>type internal-server-error
>
>message Error in sitemap configuration : Could not set up Component for
>hint: add-employee
>
>description org.apache.avalon.framework.configuration.ConfigurationExcept=
>ion:
>Error in sitemap configuration : Could not set up Component for hint: add=
>-employee
>
>sender org.apache.cocoon.servlet.CocoonServlet
>
>source Cocoon servlet
>
>request-uri
>
>/cocoon/visualizza/prova
>
>exception
>
>org.apache.avalon.framework.configuration.ConfigurationException: Error
>in sitemap configuration : Could not set up Component for hint: add-emplo=
>yee
>
>path-info
>
>visualizza/prova
>
>stacktrace
>
>org.apache.avalon.framework.configuration.ConfigurationException: Error
>in sitemap configuration : Could not set up Component for hint: add-emplo=
>yee
>
>Coccon.xconf
>
>  <datasources>
>   <component-instance name=3D"test_oracle_pool" class=3D"org.apache.avalo=
>n.util.datasource.JdbcDataSource">
>    <!--   <jdbc name=3D"test_oracle_pool">  -->
>       <!-- Don't forget the oradb parameter for Oracle!!! -->
><pool-controller min=3D"5" max=3D"10" oradb=3D"true"/>
><dburl>jdbc:oracle:thin:@server:oras</dburl>
><user>de</user>
><password>gi</password>
>    <!--   </jdbc>   -->
>   </component-instance>
>
>
>       <jdbc name=3D"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=3D"5" max=3D"10" oradb=3D"true"/>
>
>       That way the test to see if the server has disconnected
>       the JdbcConnection will function properly.
>       -->
>       <pool-controller min=3D"5" max=3D"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>
></datasources>
>
>
>web.xml
>        <init-param>
>        <param-name>load-class</param-name>
>        <param-value>
>         oracle.jdbc.driver.OracleDriveror
>        </param-value>
>
>The database driver is classes12.jar and I am able to connect to the same=
>
>database with same driver with standalone java application.
>Environment is Tomcat 4,  C2 & windows2000
>Prior to this  I connected to mySql database sucessfully.
>
>Any help on this will be highly appreciated
><gi...@tiscalinet.it>
>Thanks
>
>


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