tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georges Roux <georges.r...@pacageek.org>
Subject tomcat 4.1.18 commons-dbcp
Date Thu, 27 Feb 2003 08:56:44 GMT
*hi,*

*When I try to set up a PostgreSQL Datasource for connection Pooling I 
ve this Exception:*

2003-02-27 02:00:27 StandardContext[/PhotoBaseManager]: Servlet 
/PhotoBaseManager threw load() exception
javax.servlet.ServletException: Servlet.init() for servlet 
PostgresqlClient threw exception
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:962)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:497)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
        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)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
----- Root Cause -----
java.lang.NoClassDefFoundError: 
org/apache/commons/pool/impl/GenericObjectPool
        at 
org.apache.commons.dbcp.BasicDataSourceFactory.getObjectInstance(BasicDataSourceFactory.java:121)
        at 
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.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:181)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
        at PostgresqlClient.init(PostgresqlClient.java:37)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
        at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:497)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
        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)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

*I have commons-dbcp.jar and pgjdbc2.jar in common/lib*

*in server.xml*
        <Resource name="jdbc/postgresql"
                auth="Container"
                type="javax.sql.DataSource"/>
        <ResourceParams name="jdbc/postgresql">
                
<parameter><name>factory</name><value>org.apache.commons.dbcp.BasicDataSourceFactory</value></parameter>
                
<parameter><name>driverClassName</name><value>org.postgresql.Driver</value></parameter>
                
<parameter><name>driverName</name><value>jdbc:postgresql://192.168.123.3:5432/BasePhoto</value></parameter>
                
<parameter><name>username</name><value>tomcat4</value></parameter>
                
<parameter><name>password</name><value>java4</value></parameter>
                
<parameter><name>maxActive</name><value>100</value></parameter>
                <parameter><name>maxIdle</name><value>30</value></parameter>
                
<parameter><name>maxWait</name><value>10000</value></parameter>
        </ResourceParams>


*in my web.xml*

    <resource-ref>
        <description>PostgreSQL Datasource</description>
        <res-ref-name>jdbc/postgresql</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>

*Someone Have an idea?
Thanks in advanced
*
*Georges*

-- 

+==========================================+
|                                          |
|      Georges Roux                        |
|  URL : georgesroux.pacageek.org          |
|  email : georges.roux@pacageek.org       |
+==========================================+


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message