Do you mean commons-collection is no longer in 5.5.4 common/lib?

-----Original Message-----
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: November 26, 2004 10:14 AM
To: Tomcat Users List
Subject: RE: help on JDNI , DBCP with oracle


not in Tomcat 5.5.4 it isn't. i have commons-collections in our web-inf/lib,
and we use jndi datasources without problem. 

> -----Original Message-----
> From: Phillip Qin [mailto:[EMAIL PROTECTED]
> Sent: 26 November 2004 15:05
> To: 'Tomcat Users List'
> Subject: RE: help on JDNI , DBCP with oracle
> 
> 
> Wrong suggestion. It will cause NoClassDefFoundException
> since Tomcat has it
> in common/lib.
> 
> -----Original Message-----
> From: Allistair Crossley [mailto:[EMAIL PROTECTED]
> Sent: November 26, 2004 6:21 AM
> To: Tomcat Users List
> Subject: RE: help on JDNI , DBCP with oracle
> 
> 
> check for commons-collections.jar in your webapp's
> WEB-INF/lib folder. if
> you don't have it download from jakarta.
> 
> > -----Original Message-----
> > From: lydie soler [mailto:[EMAIL PROTECTED]
> > Sent: 26 November 2004 11:02
> > To: [EMAIL PROTECTED]
> > Subject: help on JDNI , DBCP with oracle
> > 
> > 
> > Hi,
> > 
> > I am quite new at tomcat so I am asking for your help.
> > 
> > I am trying to make tomcat deal with connection to my
> oracle database
> > 
> > Here is what I do:
> > 
> > 1. I added the classes12.jar in the CATALINA_HOME\common\lib
> > 
> > 2. in the server.xml, I added the following code
> > 
> > <Context path="/BaseDeDonnees" reloadable="true" 
> > docBase="C:\Dev\eclipse\workspace\BaseDeDonnees"
> > workDir="C:\Dev\eclipse\workspace\BaseDeDonnees\work" >
> >     <Logger className="org.apache.catalina.logger.SystemOutLogger"
> > verbosity="4" timestamp="true"/>
> >     <!-- Test pour faire gerer les connexions Oracle par Tomcat -->
> >     <Resource name="jdbc/BaseDeDonnees" scope="Shareable" 
> > type="javax.sql.DataSource"/>
> >     <ResourceParams name="jdbc/BaseDeDonnees">
> >             <parameter>
> >                     <name>factory</name>
> >                     
> > <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> >             </parameter>
> >             <parameter>
> >                     <name>driverClassName</name>
> >                     <value>oracle.jdbc.driver.OracleDriver</value>
> >             </parameter>
> >             <parameter>
> >                     <name>url</name>
> >                     <value>jdbc:oracle:thin:@bia:1521:symp</value>
> >             </parameter>
> >             <parameter>
> >                     <name>username</name>
> >                     <value>symprevius</value>
> >             </parameter>
> >             <parameter>
> >                     <name>password</name>
> >                     <value>symp</value>
> >             </parameter>
> > 
> >     </ResourceParams>
> > </Context>
> > 
> > 3. I created a web.xml file that looks like this:
> > <web-app>
> > 
> >     <display-name>Base de donnees</display-name>
> >     <description>
> >     appli pour tester la gestion de connection par tomcat
> >     </description>
> >     <resource-ref>
> >            <description>Oracle Datasource</description>
> >            <res-ref-name>jdbc/BaseDeDonnees</res-ref-name>
> >            <res-type>javax.sql.DataSource</res-type>
> >            <res-auth>Container</res-auth>
> >     </resource-ref>
> > </web-app>
> > 
> > 4. I want to execute the following code:
> > Context initContext = new InitialContext();
> > Context envContext = (Context)initContext.lookup("java:/comp/env");
> > DataSource ds = (DataSource)
> envContext.lookup("jdbc/BaseDeDonnees");
> > Connection conn = ds.getConnection();
> > 
> > but I get this error:
> > 
> > javax.servlet.ServletException: Invoker service() exception
> >     
> > org.apache.catalina.servlets.InvokerServlet.serveRequest(Invok
> > erServlet.java:524)
> >     
> > org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServ
> > let.java:216)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > 
> > 
> > cause
> > 
> > java.lang.NoClassDefFoundError: 
> > org/apache/commons/collections/CursorableLinkedList
> >     
> > org.apache.commons.pool.impl.GenericObjectPool.(GenericObjectP
> > ool.java:392)
> >     
> > org.apache.commons.pool.impl.GenericObjectPool.(GenericObjectP
> > ool.java:258)
> >     
> > org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic
> > DataSource.java:765)
> >     
> > org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat
> > aSource.java:518)
> >     
> > 
> fr.tomcat.IdentificationServlet.doPost(IdentificationServlet.java:45)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >     
> > org.apache.catalina.servlets.InvokerServlet.serveRequest(Invok
> > erServlet.java:466)
> >     
> > org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServ
> > let.java:216)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >     javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > 
> > this error occures when I try to get the connection before it seems 
> > to work fine
> > 
> > I anyone can help...
> > 
> > Thanks a lot
> > 
> > Lydie
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
> -------------------------------------------------------
> QAS Ltd.
> Developers of QuickAddress Software
> <a href="http://www.qas.com";>www.qas.com</a>
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> -------------------------------------------------------
> </FONT>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:41a7484149021619718737!

Reply via email to