Pleh

I will smack you like a bad bad donkey, ok?

Archive for January, 2008

Never Forget

Posted by pete on 5th January 2008

I’m posting this in the hope that I’ll never waste another few hours trying to fix this problem again. This is probably only of interest to me.When installing Jira and other application that use (pooled?) JDBC connections in Tomcat 5.5 (others?) on the Redhat-based distros (Fedora, RHEL, CentOS…), if you see an error message looking like this…

2008-01-04 23:22:59,963 main WARN [core.entity.transaction.JNDIFactory] [ConnectionFactory.getConnection] Failed to find DataSource named java:comp/env/jdbc/JiraDS in JNDI server with name default. Trying normal database. javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]

…the problem is with the distro’s use of the Jakarta Commons version of DBCP and Tomcat’s expectation that the BasicDataSourceFactory class being in Tomcat’s naming-factory-dbcp.jar file. For whatever reason, the distro preferred the Jakarta version.This can be simply solved by adding the following to your JAVA_OPTS environmental variable:

-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory

…which is most likely in /etc/sysconfig/tomcat5.To give credit where credit is due, I found most of my info about this problem and the solution here.

May I never waste more time on this problem.

Technorati Tags: , , , , ,

Posted in Geekery | 2 Comments »

 
21820 pages viewed, 141 today
7834 visits, 39 today
FireStats icon Powered by FireStats