| eclipselink problem with commons-dbcp [message #517325]
||Fri, 26 February 2010 18:05
| Anthony Biacco
Registered: February 2010
Tomcat 6.0.24 on linux.
Using commons-dbcp 1.4
NOT using tomcat-dbcp
Using eclipselink 2.0.1
Receiving the following error in tomcat:
Feb 26, 2010 3:34:26 PM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not create resource factory instance [Root exception is
This occurs with the eclipselink jar, persistence jar and persistence XSD in either the tomcat/lib or the webapp lib.
My persistence XML is using RESOURCE_LOCAL and a non-jta-data-source pointing to a globally defined jdbc resource.
If i keep tomcat-dbcp in my tomcat/lib then it works fine. I'm guessing it's attempting to find dbcp.dbcp.BasicDataSourceFactory (from tomcat-dbcp) instead of just dbcp.BasicDataSourceFactory (from commons-dbcp).
But i prefer not to use tomcat's own version of the dbcp jar as i like to keep my jars up to date and tomcat's version tends to be behind.
1. How do i get this to work with commons-dbcp without tomcat-dbcp?
2. Do i need the seperate xsd file? (I see it's also in the eclipselink jar). I really don't want that in my tomcat/lib.
3. Can i put both the eclipselink and persistence jars in the webapp dir instead of tomcat/lib? (i don't use them for any other webapps)
4. If i put " -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.Basic DataSourceFactory " in my tomcat startup, i don't receive the error, but again, prefer not to do this workaround if i can help it.
5. I didn't have this problem using the toplink stuff.
Thanx for the help,
Powered by FUDForum
. Page generated in 0.03010 seconds