[fedora-java] Exception processing Global JNDI Resources - on FC6&Tomcat5.5.17

Vivek Lakshmanan vivekl at redhat.com
Fri May 11 04:12:58 UTC 2007


On Thu, 2007-05-10 at 17:36 -0600, Aaron Luchko wrote:
> On Thu, 2007-05-10 at 16:23 -0700, Tim Alberts wrote:
> > java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
> > 
> > means Tomcat can't find a class it needs, but as I'm running all rpms 
> > from FC6 I assumed everything would be 'plug and play'.  Does anyone 
> > have some suggestions for fixing this quick?
> 
> This is because there were some jars missing from the corresponding
> version of the jpackage rpm
> 
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=238192
> 
> Until the package is updated the workaround I'm using is to manually add
> naming-factory-dbcp.jar to /var/lib/tomcat5/common/lib/
> 
The real issue is that upstream tomcat5 build creates the
naming-factory-dbcp.jar and others by extracting classes from
commons-dbcp, collections, etc. and sticking them under the
org.apache.tomcat.x package (I personally dont like it  but some claim
they prefer this since they can include newer/older j-c-* jars in their
webapps and prevent classloading issues) . Until recently, JPackage has
been sym-linking to j-c-dbcp.jar etc. produced by the relevant
jakarta-commons-* rpm directly without changing the packages. It is only
recently that these jakarta-commons-* packages have been modified to
produce a -tomcat5 package that have these renamed packages which
tomcat5 sym-links to. 

For the moment, a workaround I would go with is to add a Resource tag in
your /etc/tomcat5/server.xml file nexted under the GlobalNamingResources
tag with factory="org.apache.commons.dbcp.BasicDataSourceFactory"
attribute or doing the same thing in your web-app's context.xml nested
inside the the Context tag... You can refer to
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html for
reference. 

However, I do think there are several benefits to going to 5.5.23 for
tomcat5, I just havent evaluated all the changes necessary in Fedora
6/7. I will update bz# 238192 when I am ready.
Vivek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-devel-java-list/attachments/20070511/e9a2d339/attachment.sig>


More information about the fedora-devel-java-list mailing list