Bug #9976 Unable to instantiate logger class 'com.mysql.jdbc.log.Log4JLogger'
Submitted: 18 Apr 2005 15:47 Modified: 31 Mar 2014 9:17
Reporter: Claude Morin Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S1 (Critical)
Version:3.1.8 OS:Linux (Linux)
Assigned to: Alexander Soklakov CPU Architecture:Any

[18 Apr 2005 15:47] Claude Morin
Description:
Since I installed the version 3.1.8 of the Connector J (mysql-connector-java-3.1.8-bin.jar) on ColdFusion MX 6.1, I get this error message every time I'm doing a query. I had to revert back to version 3.1.7.

"Error Executing Database Query. Unable to instantiate logger class 'com.mysql.jdbc.log.Log4JLogger', exception in constructor?"
coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query.
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:495)

There is another version of the jar (mysql-connector-java-3.1.8-bin-g.jar not explained in the documentation, at least I didn't find it) which is bigger in size but didn't work better.

Not sure if it's only a Linux problem or a ColdFusion MX 6.1, but I also installed mysql-connector-java-3.1.8-bin.jar on a Windows XP/ColdFusion MX 7 system and there, it is working correctly.

How to repeat:
Just do a query on CFMX 6.1 with the new mysql-connector-java-3.1.8-bin.jar connector.
[27 Apr 2005 17:16] Mark Matthews
If log4j.jar is available on the CLASSPATH, the JDBC driver attempts to use it for logging purposes. It sounds like CFMX has an abnormal classpath setup where log4j classes are available but not really.

Try adding "logger=com.mysql.jdbc.log.StandardLogger" to your JDBC url to force the driver to use the built-in stderr logging facility.
[29 Apr 2005 19:20] Claude Morin
Hi Mark!

Didn't work better...  Here are the logs:

SQLException while attempting to connect: java.sql.SQLException: Unable to instantiate logger class 'com.mysql.jdbc.log.Log4JLogger', exception in constructor?
Unable to instantiate logger class 'com.mysql.jdbc.log.Log4JLogger', exception in constructor?
Unable to instantiate logger class 'com.mysql.jdbc.log.Log4JLogger', exception in constructor?
java.sql.SQLException: Unable to instantiate logger class 'com.mysql.jdbc.log.Log4JLogger', exception in constructor?
        at com.mysql.jdbc.log.LogFactory.getLogger(LogFactory.java:74)
        at com.mysql.jdbc.Connection.initializeDriverProperties(Connection.java:3258)
        at com.mysql.jdbc.Connection.<init>(Connection.java:434)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
        at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:559)
        at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:64)
        at java.lang.Thread.run(Thread.java:534)
[29 May 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[20 Aug 2005 9:22] Perciot Jérôme
You just have to replace your connector by this one : mysql-connector-java-3.0.17-ga-bin.jar you cna find here : http://dev.mysql.com/downloads/connector/j/3.0.html

Install it as you installed the previous one and it's OK.

That'a all folks !
[31 Mar 2014 9:17] Alexander Soklakov
Fixed in 3.0.17