Intrepid SRU Report

Bug impact: Tomcat 6 currently points to a default DBCP factory class
that isn't provided in the package
(org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory). That makes all web
applications that don't specify a DBCP factory class fail. We provide
org.apache.commons.dbcp.BasicDataSourceFactory to that effect, so Tomcat
6 should use that class by default.

Versions affected: Intrepid (tomcat6 didn't exist before)
Fix in development branch: Was fixed in 6.0.18-0ubuntu4 (see comment 10)

Minimal patch: see comment 12 above. The patch does the same thing the
Tomcat 5.5 package always did, and fixes the shipped documentation
accordingly. If accepted, this will be released as a combined SRU with
bug 294277.

TEST CASE
$ Get the two attached files (test-dbcp.tar and test-dbcp.xml)
$ sudo apt-get install tomcat6-examples
$ sudo /etc/init.d/tomcat6 stop
$ cd /var/lib/tomcat6/webapps && sudo tar xvf ~/test-dbcp.tar
$ sudo cp ~/test-dbcp.xml /etc/tomcat6/Catalina/localhost
$ sudo /etc/init.d/tomcat6 start
let a few seconds pass, then access http://localhost:8080/test-dbcp

With an unpatched Tomcat 6 you get an exception page, with root cause:
javax.servlet.ServletException: javax.naming.NamingException: Could not create 
resource factory instance [Root exception is 
java.security.AccessControlException: access denied 
(java.lang.RuntimePermission accessClassInPackage.org.apache.tomcat.dbcp.dbcp)]
This shows you're trying to access the (not provided) 
org.apache.tomcat.dbcp.dbcp package

With a patched Tomcat6 you get the JSP ("Sample Application JSP Page")
displayed correctly.

Regression potential:
People that downloaded tomcat-dbcp.jar (which contains the missing 
org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory) from the ASF website as a 
workaround to this bug might, after this update, use 
org.apache.commons.dbcp.BasicDataSourceFactory instead. This shouldn't trigger 
any issue since the two factories should act the same.

** Attachment added: "test-dbcp.tar"
   http://launchpadlibrarian.net/20344691/test-dbcp.tar

-- 
tomcat6 does not include tomcat-dbcp.jar
https://bugs.launchpad.net/bugs/283852
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to tomcat6 in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to