Bug 900806 (JBEWS-178) - Tomcat7: ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
Summary: Tomcat7: ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceF...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEWS-178
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: unspecified
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 2.0.0
Assignee: Permaine Cheung
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks: 969023
TreeView+ depends on / blocked
 
Reported: 2012-08-21 18:09 UTC by Zbyněk Roubalík
Modified: 2018-12-05 15:46 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 969023 (view as bug list)
Environment:
RHEL6, jdk7
Last Closed: 2012-09-20 08:20:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 900723 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Issue Tracker JBEWS-178 0 Critical Closed Tomcat7: ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory 2017-06-26 16:08:14 UTC

Internal Links: 900723

Description Zbyněk Roubalík 2012-08-21 18:09:46 UTC
project_key: JBEWS

I got java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory, when I was trying to lookup name for Tomcat JNDI datasource. 

Same operation is working well on Apache Tomcat 7.0.29 Upstream Project distribution downloaded from Tomcat's site.

ER4: When I replaced tomcat-dbcp.jar in Tomcat/EWS distribution with the same file from Tomcat/Upstream Project distribution, everything was OK. 

ER7: in this build the file tomcat-dbcp.jar is missing, when I put there file from Tomcat/Upstream, everything was OK.

Log: [http://pastebin.test.redhat.com/102966]

Comment 1 Zbyněk Roubalík 2012-08-21 18:10:44 UTC
Link: Added: This issue relates to JBPAPP-9551


Comment 2 Permaine Cheung 2012-08-21 18:17:44 UTC
David, can you please take a look? Thanks

Comment 3 David Knox 2012-08-21 19:48:21 UTC
This is a repeat of jbpapp-6306 and jbpapp-3749.

The EWS/tomcat builds do not include tomcat-dbcp. Instead, commons-dbcp, commons-collections, and commons-pool. There is little difference between the two since tomcat-dbcp is a conglomerate of the three changing the package name to o.a.tomcat.dbcp versus o.a.commons.dbcp

If using the RPM distro - edit /etc/tomcatX/tomcatx.conf. Search for 3749 and delete the comment from the JAVA_OPTS line. 

If using the Zip distro - edit catalina.sh. Search for JAVA_OPTS. Beneath the commented SecurityListener add one line:
JAVA_OPTS="$JAVA_OPTS -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"

The above was done previously viz 6306 and 3749. I will go through all of the ews1,2 builds and remove the comment from tomcatx.conf for the rpms, and fix catalina.sh in the zip. When that's done I'll resolve and reassign to Permaine.

--david


Comment 4 Zbyněk Roubalík 2012-08-22 09:14:56 UTC
I'm using ZIP distro, I put the line in catalina.sh, but it isn't working. 

I got an exception: [http://pastebin.test.redhat.com/103044]

Comment 5 David Knox 2012-08-22 15:13:40 UTC
Yep. I ran into that last night. It seems there is a packaging problem, i.e., the wrong package name (o.a.tomcat. versus o.a.commons). Wei Nan and I are working on it.

Comment 6 David Knox 2012-08-22 16:51:19 UTC
The second problem above is because the java package 
names between commons-[collections,pool,dbcp]-tomcat-eap6 do not agree. 

The java package name in collections,pool-tomcat-eap6 jars is 
org.apache.tomcat, while the java package name in both dbcp jars 
is org.apache.commons 

The java package names among the three jars must be 
org.apache.commons or org.apache.tomcat.dbcp.

Comment 7 David Knox 2012-08-22 16:52:29 UTC
To fix the commons-dbcp package

Comment 8 Permaine Cheung 2012-08-23 12:32:28 UTC
Weinan, please work with David on this one to see what is needed by Tomcat.

Comment 9 Weinan Li 2012-09-13 04:19:24 UTC
We have uniformed name of all these -eap6 packages. Currently the package name:

[./org/apache/tomcat/dbcp/dbcp/BasicDataSourceFactory.class]

I'll verify the tomcat7 in ER9.

Comment 10 Weinan Li 2012-09-13 12:30:11 UTC
Verified the bug has been fixed in our tomcat7. Here is the detail information: [https://gist.github.com/3713978]

Comment 11 Zbyněk Roubalík 2012-09-20 08:20:38 UTC
Verified on EWS 2.0.0.ER10

Comment 12 Jiri Skrabal 2012-11-13 16:26:24 UTC
Docs QE Status: Removed: NEW 



Note You need to log in before you can comment on or make changes to this bug.