tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johann Uhrmann <johann.uhrm...@xpecto.com>
Subject Missing jdbc context
Date Wed, 22 Oct 2003 11:59:54 GMT
Hello,

I have some problems with Tomcat 4.1.27 and database connection pooling:

Apparently, the context java:comp/env/jdbc does not exist.

This is what I get from catalina.out:

Starting service Tomcat-Standalone
Apache Tomcat/4.1.27-LE-jdk14
GlobalResourcesLifecycleListener: Destroying MBeans for Global JNDI Resources
Stopping service Tomcat-Standalone
GlobalResourcesLifecycleListener: Creating MBeans for Global JNDI Resources in Context ''
org.apache.naming.NamingContext@be16f5
GlobalResourcesLifecycleListener: Processing resource jdbc java.lang.String
GlobalResourcesLifecycleListener: Creating MBeans for Global JNDI Resources in Context 'jdbc/'
org.apache.naming.NamingContext@7cec96
GlobalResourcesLifecycleListener: Naming exception processing jdbc: org.apache.naming.NamingContext:org.apache.naming.NamingContext@7cec96
javax.naming.NamingException: Cannot create resource instance


The configuration in server.xml is:

<?xml version='1.0' encoding='utf-8'?>
<Server className="org.apache.catalina.core.StandardServer" debug="0" port="8006" shutdown="SHUTDOWN">
   <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0" jsr77Names="false"/>
   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="2"/>
   <GlobalNamingResources>
     <Resource name="jdbc/globaldb" scope="Shareable" type="javax.sql.DataSource"/>
     <ResourceParams name="jdbc/globaldb">
       <parameter>
         <name>validationQuery</name>
         <value>select version()</value>
       </parameter>
       <parameter>
         <name>url</name>
         <value>jdbc:postgresql://dbserver:5432/mydb</value>
       </parameter>
       <parameter>
         <name>password</name>
         <value>myPwd</value>
       </parameter>
       <parameter>
         <name>maxActive</name>
         <value>10</value>
       </parameter>
       <parameter>
         <name>maxWait</name>
         <value>5000</value>
       </parameter>
       <parameter>
         <name>driverClassName</name>
         <value>org.postgresql.Driver</value>
       </parameter>
       <parameter>
         <name>username</name>
         <value>dbuser</value>
       </parameter>
       <parameter>
         <name>maxIdle</name>
         <value>2</value>
       </parameter>
     </ResourceParams>
...


Can someone give me a hint why that context is not available?

Thank You,

Johann Uhrmann

-- 
Johann Uhrmann
xpecto AG | Lindenstrasse 81 | D-84030 Ergolding
Telefon: 0700 xpecto 00 (0700 973286 00)
Telefax: 0700 xpecto 10 (0700 973286 10)
Internet: http://www.xpecto.com


---------------------------------------------------------------------
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