[Bug 408253] New: tomcat6 fails because if missing commons-xxxx jars
https://bugzilla.novell.com/show_bug.cgi?id=408253 Summary: tomcat6 fails because if missing commons-xxxx jars Product: openSUSE 11.0 Version: Final Platform: x86 OS/Version: openSUSE 11.0 Status: NEW Severity: Major Priority: P5 - None Component: Java AssignedTo: bnc-team-java@forge.provo.novell.com ReportedBy: willems.luc@pandora.be QAContact: qa@suse.de Found By: --- Created an attachment (id=227210) --> (https://bugzilla.novell.com/attachment.cgi?id=227210) patch to fix usage of commons-xxxx datasource factory while installing the archiva (see http://archiva.apache.org/docs/1.0.2/adminguide/webapp.html ) war into a clean tomcat6 installation, i noticed a startup exception : at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:114) ... 134 more according to tomcat mailing list this happens because "repackaging of tomcat" and excluding the original jar , replacing them with commons based jars http://www.mail-archive.com/users%40tomcat.apache.org/msg27481.html validating the src RPM i noticed in the %post lib part %post lib build-jar-repository %{libdir} \ %if ! %defined suse_version commons-collections-tomcat5 \ commons-dbcp-tomcat5 \ commons-pool-tomcat5 \ %endif ecj 2>&1 this basicly excludes the required jars in a SuSE based distribution :-( also , it's using tomcat5 variants ? i fixed the spec file like this %post lib build-jar-repository %{libdir} \ commons-collections \ commons-dbcp \ commons-pool \ ecj 2>&1 and make sure the commons-xxxx are added to the Required rpm's with this in place , the jar files are added to /usr/share/tomcat6/lib after this , startup still needed the "-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" option like in mentioned in the mail because we replaced the original dependencies with commons-xxxx , we need to patch java/org/apache/naming/factory/Constants.java to use the commons-xxxx based class so that tomcat6 will work out of the box -) included is a patch file to fix this. after this changes , tomcat6 will work with commons-xxx based jars and use correct DataSourceFactory . -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=408253
User willems.luc@pandora.be added comment
https://bugzilla.novell.com/show_bug.cgi?id=408253#c1
--- Comment #1 from luc willems
https://bugzilla.novell.com/show_bug.cgi?id=408253
Michal Vyskocil
https://bugzilla.novell.com/show_bug.cgi?id=408253
User mvyskocil@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=408253#c2
Michal Vyskocil
https://bugzilla.novell.com/show_bug.cgi?id=408253
User willems.luc@pandora.be added comment
https://bugzilla.novell.com/show_bug.cgi?id=408253#c3
luc willems
https://bugzilla.novell.com/show_bug.cgi?id=408253
User mvyskocil@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=408253#c4
--- Comment #4 from Michal Vyskocil
https://bugzilla.novell.com/show_bug.cgi?id=408253
User willems.luc@pandora.be added comment
https://bugzilla.novell.com/show_bug.cgi?id=408253#c5
--- Comment #5 from luc willems
https://bugzilla.novell.com/show_bug.cgi?id=408253
User mvyskocil@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=408253#c6
Michal Vyskocil
participants (1)
-
bugzilla_noreply@novell.com