Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

BasicDataSourceFactory.class where? (Tomcat 5.5, RHEL)

Juergen Nickelsen

2007-08-01

Replies:

Hello,

for an application I am testing, I have my first contact with Tomcat,
version 5.5.23 on RHEL 4 update 5, as installed from the package
tomcat5-5.5.23-0jpp_4rh.3.

What shall I say? It does not work yet. :-/

The main problem seems to be that Tomcat complains on startup about a
missing class org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory:

WARNING: Failed to register in JMX: javax.naming.NamingException: Could
not create resource factory instance [Root exception is
java.lang.ClassNotFoundException:
org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]

This class is specified as the "factory" attribute in the Resource
specification of the application context in Tomcat's server.xml.

I can believe that Java/Tomcat cannot find this class, as I cannot find
it either -- not in the jar files in /usr/share/tomcat5/common/lib and
not anywhere else. Still the name suggests that it should be something
that somehow belongs to Tomcat. I do have the package
jakarta-commons-dbcp-1.2.1-3jpp_1rh installed, which sounds like a
promising suspect, but it brings me only
org.apache.commons.dbcp.BasicDataSourceFactory.class and not the one above.

I'd switch to that just for a try, only it does not work the same way --
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory.class -- although that
class is in ../tomcat5/common/lib/[commons-dbcp].jar .

Now I'm puzzled.
Which BasicDataSourceFactory can/should I use?
Why does Java/Tomcat not find the class in [commons-dbcp].jar?
What can I do?

I'd appreciate any help, as I am at a loss now; if this is an FAQ, a
pointer to the related information, too, of course.

Best regards, Juergen.

---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.