tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul" <p...@msci.ca>
Subject Re: Configuring a JDBC Data Source
Date Wed, 24 Sep 2003 14:29:31 GMT
you should be able to find all the packages given below on the Tomcat
website somewhere.  Just browse around.  Don't forget to unzip the packages,
because they contain .jar's within the compressed download.

DBCP uses the Jakarta-Commons Database Connection Pool packages:
 Jakarta-Commons DBCP 1.0
 Jakarta-Commons Collections 2.0
 Jakarta-Commons Pool 1.0

Third Party drivers should be in jarfiles, not zipfiles. Tomcat only adds
$CATALINA_HOME/common/lib/*.jar to the classpath.  (If the driver is already
a zip file, simply rename it as .jar)

-paul lomack

----- Original Message ----- 
From: "Renda, Michael" <michael.renda@info-resonance.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Wednesday, September 24, 2003 7:05 AM
Subject: RE: Configuring a JDBC Data Source


> I've got the commons-dbcp.jar file in the common/lib directory.  Where
> do I find the commons-pool.jar file?
>
> Mike
>
> -----Original Message-----
> From: Adam Hardy [mailto:ahardy.struts@cyberspaceroad.com]
> Sent: Wednesday, September 24, 2003 4:20 AM
> To: Tomcat Users List
> Subject: Re: Configuring a JDBC Data Source
>
> sounds like you need the commons-dbcp and commons-pool jar files as
> well.
>
> Adam
>
> On 09/24/2003 01:52 AM Renda, Michael wrote:
> > I'm trying to configure a JDBC Data Source for a Tomcat 4.1.27
> > installation.  I used the Admin tool which wrote the following entry
> to
> > my server.xml file:
> >
> >   <GlobalNamingResources>
> >     <Resource name="jdbc/connection" scope="Shareable"
> > type="javax.sql.DataSource"/>
> >     <ResourceParams name="jdbc/connection">
> >       <parameter>
> >         <name>maxWait</name>
> >         <value>5000</value>
> >       </parameter>
> >       <parameter>
> >         <name>maxActive</name>
> >         <value>4</value>
> >       </parameter>
> >       <parameter>
> >         <name>password</name>
> >         <value>secret</value>
> >       </parameter>
> >       <parameter>
> >         <name>url</name>
> >         <value>jdbc:microsoft:sqlserver:192.168.0.2:1433</value>
> >       </parameter>
> >       <parameter>
> >         <name>driverClassName</name>
> >         <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
> >       </parameter>
> >       <parameter>
> >         <name>maxIdle</name>
> >         <value>2</value>
> >       </parameter>
> >       <parameter>
> >         <name>username</name>
> >         <value>sa</value>
> >       </parameter>
> >     </ResourceParams>
> >   </GlobalNamingResources>
> >
> > I have placed the jar files for the sql/server jdbc driver in the
> > common/lib directory.
> >
> > Now Tomcat won't start up.  I have the following message in my log:
> >
> > INFO: Initializing Coyote HTTP/1.1 on port 8080
> > Exception during startup processing
> > java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> > a:39)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> > Impl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at
> > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> > Caused by: java.lang.NoClassDefFoundError:
> > org/apache/commons/pool/impl/GenericObjectPool
> > at
> >
> org.apache.commons.dbcp.BasicDataSourceFactory.getObjectInstance(BasicDa
> > taSourceFactory.java:121)
> > at
> >
> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFact
> > ory.java:186)
> > at
> >
> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
> > at
> > org.apache.naming.NamingContext.lookup(NamingContext.java:834)
> > at
> > org.apache.naming.NamingContext.lookup(NamingContext.java:194)
> > at
> >
> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans
> > (GlobalResourcesLifecycleListener.java:214)
> > at
> >
> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans
> > (GlobalResourcesLifecycleListener.java:220)
> > at
> >
> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans
> > (GlobalResourcesLifecycleListener.java:181)
> > at
> >
> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEve
> > nt(GlobalResourcesLifecycleListener.java:149)
> > at
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
> > pport.java:166)
> > at
> >
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2183)
> > at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
> > at
> > org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
> > at
> > org.apache.catalina.startup.Catalina.process(Catalina.java:180)
> > ... 5 more
> >
> > Can anyone tell me what I'm doing wrong here?
> >
> > Thanks,
> >
> > Mike Renda
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
> -- 
> struts 1.1 + tomcat 4.1.27 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> ---------------------------------------------------------------------
> 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