cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Van Kets <b...@visitronics.be>
Subject Re: Help connect Cocoon2 to Oracle8
Date Wed, 27 Feb 2002 20:20:41 GMT
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
><giuseppe.devincenzi<mailto:amperrone.isi@sogei.it>@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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message