commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antony Paul" <antonypau...@hotmail.com>
Subject Re: [DBCP] - ClassNotFoundException with Oracle
Date Fri, 05 Mar 2004 06:26:58 GMT
I cut and pasted oracle jar(ojdbc14.jar) from common\lib to WEB-INF\lib.
Which servlet container  you are using  ?.

rgds
Antony Paul

----- Original Message -----
From: "G. Madhan Dennis" <madhan@isoftel.com>
To: "'Jakarta Commons Users List'" <commons-user@jakarta.apache.org>
Sent: Friday, March 05, 2004 11:05 AM
Subject: RE: [DBCP] - ClassNotFoundException with Oracle


> Hi,
>
> We put the oracle jdbc driver in the WEB-INF/lib directory and it works
> fine. Are you sure you have the correct version/driver? Because the
> Oracle driver we use is named classes12.zip. We just rename it to
> classes12.jar and put it in the Web-INF/lib and DBCP works well.
>
> Regards,
> Madhan
>
> -----Original Message-----
> From: Antony Paul [mailto:antonypaul24@hotmail.com]
> Sent: Friday, March 05, 2004 10:50 AM
> To: Jakarta Commons Users List
> Subject: Re: [DBCP] - ClassNotFoundException with Oracle
>
> Thanks for the reply.
> What if I move DBCP jars to WEB-INF\lib ?. Is DBCP is managed by Tomcat
> ?.
>
> rgds
> Antony Paul
>
> ----- Original Message -----
> From: "Jacob Kjome" <hoju@visi.com>
> To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
> Sent: Friday, March 05, 2004 10:29 AM
> Subject: Re: [DBCP] - ClassNotFoundException with Oracle
>
>
> >
> > DBCP needs access to the oracle driver.  The way classpaths work, the
> > parent can't see the child.  As such, library in common/lib,
> server/lib,
> or
> > shared/lib cannot load a library in WEB-INF/lib.  As such, you will
> need
> to
> > put the oracle jar in common/lib.  There is no way around it if you
> want
> > the container to manage the connection pool.  If Tomcat used something
> like
> > JBoss' unified classloader, it might be different, but with the
> classloader
> > hierarchy that Tomcat uses, you'll just have to bite the bullet and
> move
> > the oracle driver out of WEB-INF/lib and into common/lib.
> >
> > Jake
> >
> > At 09:22 AM 3/5/2004 +0530, you wrote:
> > >Hi all,
> > >     I am getting ClassNotFoundException when I put the ojdbc14.jar
> in
> the
> > >WEB-INF\lib folder. If I keep it in common\lib it is ok. Using JNDI
> to
> get a
> > >datasource.
> > >Tomcat 4.1.27
> > >DBCP 1.1
> > >JDK 1.4.1
> > >The line throwing exception is -  ds.getConnection();
> > >
> > >This is the stack trace.
> > >org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
> class
> > >'oracle.jdbc.driver.OracleDriver', cause:
> > >java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
> > >  at
> >
> >org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL
> oade
> r
> > >java:992)
> > >  at
> >
> >org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL
> oade
> r
> > >java:857)
> > >  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
> > >  at java.lang.Class.forName0(Native Method)
> > >  at java.lang.Class.forName(Class.java:140)
> > >  at
> >
> >org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
> e.ja
> v
> > >a:730)
> > >  at
> >
> >org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
> ava:
> 5
> > >18)
> > >  at util.Pool.getConnection(Pool.java:52)
> > >
> > >rgds
> > >Antony Paul
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message