tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cavan Morris <cmor...@paycom.net>
Subject DBCP JNDI problem
Date Mon, 14 Apr 2003 21:17:04 GMT
I have the weirdest problem I have ever seen, which probably means I'm doing 
something stupid, but I'm stumped. I set up DBCP with JNDI as described in 
the documentation and modified my code to use it.  Now, whenever I request a 
Connection I get the following error.

 java.lang.NoClassDefFoundError: tyrex/jdbc/xa/EnabledDataSource
at 
org.apache.naming.factory.TyrexDataSourceFactory.getObjectInstance(TyrexDataSourceFactory.java:166)
        at 
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:164)
        at 
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:311)
        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)

So the relevant question is... Why the hell is it trying to use a Tyrex 
factory when I have the configuration below.

<Resource name="jdbc/MyDB" auth="Container" type="javax.sql.DataSource"/>
		<ResourceParams name="jdbc/MyDB">
			<parameter>
				<name>factory</name>
				<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
			</parameter>
			<parameter>
	      	<name>maxActive</name>
   	   	<value>50</value>
	    	</parameter>
			<parameter>
      		<name>maxIdle</name>
      		<value>0</value>
    		</parameter>
	    	<parameter>
      		<name>maxWait</name>
   	   	<value>180000</value>
    		</parameter>
	    	<parameter>
     			<name>username</name>
     			<value>myname</value>
   	 	</parameter>
    		<parameter>
     			<name>password</name>
     			<value>mypass</value>
    		</parameter>
			<parameter>
				<name>driverClassName</name>
   	    	<value>com.mysql.jdbc.Driver</value>
    		</parameter>
			<parameter>
   		   <name>url</name>
   		   <value>jdbc:mysql://Myserver/Mydb?autoReconnect=true</value>
    		</parameter>
  		</ResourceParams>

As always, any thoughts would be greatly appreciated.

-Cavan Morris

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