tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Renda, Michael" <michael.re...@info-resonance.com>
Subject Configuring a JDBC Data Source
Date Tue, 23 Sep 2003 23:52:44 GMT
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

Mime
View raw message