tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antony Paul" <antonypau...@hotmail.com>
Subject Re: Problem configuring a global resource to be linked from Context elements ....
Date Fri, 17 Sep 2004 03:55:14 GMT
I think it is because of the way Tomcat classloaders work. Classes in
common\lib or common\classes cannot see classes in WEB-INF\lib. DBCP looks
for the JDBC Driver class and it cannot read it from WEB-INF\lib. This is
the answer I got when I had similar problem. For further info on this you
need help from experts in this list. If the problem is not solved please
reply.

rgds
Antony paul

----- Original Message -----
From: "Jonathan Rengifo" <jmrengifo@gmail.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Thursday, September 16, 2004 8:48 PM
Subject: Re: Problem configuring a global resource to be linked from Context
elements ....


> Hi to all...
>
> Antony, sorry I have already found dbcp.jar and know what it does, but
> don't understand why I should copy it to my WEB-INF/lib application
> source ?
>
>
> On Thu, 16 Sep 2004 11:06:53 -0400, Jonathan Rengifo
> <jmrengifo@gmail.com> wrote:
> > Hi again and thanks to all... :D
> >
> > Antony, please can you tell what is dbcp.jar and where I can find it?
> > so I can try your recommendation...
> >
> > Thanks...
> >
> >
> > Jonathan
> >
> > On Thu, 16 Sep 2004 18:35:51 +0530, Antony Paul
> > <antonypaul24@hotmail.com> wrote:
> > > Had you tried it with inside Context element. If it doesn't work it
means
> > > the JDBC driver is not found when Tomcat starts up. You have to put
JDBC jar
> > > in CATALINA_HOME\common\lib. It can be placed in WEB-INF\lib if you
place
> > > dbcp.jar too there.
> > >
> > > rgds
> > > Antony Paul
> > >
> > > ----- Original Message -----
> > > From: "Shapira, Yoav" <Yoav.Shapira@mpi.com>
> > > To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>; "Jonathan
Rengifo"
> > > <jmrengifo@gmail.com>
> > > Sent: Thursday, September 16, 2004 6:02 PM
> > > Subject: RE: Problem configuring a global resource to be linked from
Context
> > > elements ....
> > >
> > >
> > > Hi,
> > >
> > >
> > > Maybe there really is a bug in the Tomcat release you're using: which
> > > one are you trying?
> > >
> > > Yoav Shapira
> > > Millennium Research Informatics
> > >
> > > >-----Original Message-----
> > > >From: Jonathan Rengifo [mailto:jmrengifo@gmail.com]
> > > >Sent: Wednesday, September 15, 2004 9:08 PM
> > > >To: Tomcat User List
> > > >Subject: Problem configuring a global resource to be linked from
> > > Context
> > > >elements ....
> > > >
> > > >Hi all....
> > > >
> > > >
> > > >This is the third time I've write a message to the list asking for
the
> > > >same issue, but didn't solve it, I am starting to think about this is
> > > >a really bug in Tomcat 5. My question is ... Why when I configure a
> > > >Resource inside the GlobalNamingResources element just to
ResourceLink
> > > >it inside the context it just doesn't work, throwing an exception
like
> > > >this ...
> > > >
> > > >org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
> > > >class 'oracle.jdbc.driver.OracleDriver'
> > > >
> > > >This means to me that the oracle driver I am using is could no be
> > > >found, but then, why when I cut the Resource and paste it inside
every
> > > >Context I use it just work fine???...
> > > >
> > > >Please help.... How do I configure this global resource??
> > > >
> > > >Here is how I am setting this up...
> > > >
> > > ><GlobalNamingResources>
> > > >
> > > ><Resource name="jdbc/app" auth="Container" scope="Shareable"
> > > >type="javax.sql.DataSource"/>
> > > >     <ResourceParams name="jdbc/app">
> > > >         <parameter>
> > > >             <name>factory</name>
> > > >
> > > <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> > > >         </parameter>
> > > >         <parameter>
> > > >             <name>url</name>
> > > >
> > > <value>jdbc:oracle:thin:@myDatabaseServer:port:user</value>
> > > >         </parameter>
> > > >         <parameter>
> > > >             <name>password</name>
> > > >             <value>myPassword</value>
> > > >         </parameter>
> > > >         <parameter>
> > > >             <name>maxActive</name>
> > > >             <value>20</value>
> > > >         </parameter>
> > > >         <parameter>
> > > >             <name>maxWait</name>
> > > >             <value>-1</value>
> > > >         </parameter>
> > > >         <parameter>
> > > >             <name>driverClassName</name>
> > > >             <value>oracle.jdbc.driver.OracleDriver</value>
> > > >         </parameter>
> > > >         <parameter>
> > > >             <name>username</name>
> > > >             <value>myUser</value>
> > > >         </parameter>
> > > >         <parameter>
> > > >             <name>maxIdle</name>
> > > >             <value>10</value>
> > > >         </parameter>
> > > >     </ResourceParams>
> > > ></GlobalNamingResources>
> > > >
> > > >
> > > >Thanks ..
> > > >
> > > >Jonathan
> > > >
> > > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > > This e-mail, including any attachments, is a confidential business
> > > communication, and may contain information that is confidential,
proprietary
> > > and/or privileged.  This e-mail is intended only for the individual(s)
to
> > > whom it is addressed, and may not be saved, copied, printed, disclosed
or
> > > used by anyone else.  If you are not the(an) intended recipient,
please
> > > immediately delete this e-mail from your computer system and notify
the
> > > sender.  Thank you.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

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


Mime
View raw message