Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-6

hibernate c3p0 mchange-commons-java raises error on IBMJDK

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • JWS 3.0.0 ER2.1, JWS 3.0.1 DR1, JWS 3.0.1 CR1, JWS 3.1.0 GA, JWS 3.1.0 SP1 DR1
    • hibernate
    • None
    • Release Notes
    • Hide
      If using `mchange-commons-java` in Hibernate c3p0 on an IBM JDK, a `java.lang.ClassNotFoundException: org.slf4j.ILoggerFactory` error may be thrown, such as the following:

      ----
      java.lang.ClassNotFoundException: org.slf4j.ILoggerFactory
          at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source)
          at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source)
          at java.lang.Class.forNameImpl(Native Method)
          at java.lang.Class.forName(Class.java:199)
          at com.mchange.v2.log.MLog.findByClassnames(MLog.java:143)
          at com.mchange.v2.log.MLog.refreshConfig(MLog.java:73)
          at com.mchange.v2.log.MLog.<clinit>(MLog.java:51)
      ----

      The cause of this issue is under investigation.

      You can work around this issue by setting the following property in your application:

      ----
      System.setProperty("com.mchange.v2.log.MLog", "com.mchange.v2.log.jdk14logging.Jdk14MLog");
      ----
      Show
      If using `mchange-commons-java` in Hibernate c3p0 on an IBM JDK, a `java.lang.ClassNotFoundException: org.slf4j.ILoggerFactory` error may be thrown, such as the following: ---- java.lang.ClassNotFoundException: org.slf4j.ILoggerFactory     at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source)     at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source)     at java.lang.Class.forNameImpl(Native Method)     at java.lang.Class.forName(Class.java:199)     at com.mchange.v2.log.MLog.findByClassnames(MLog.java:143)     at com.mchange.v2.log.MLog.refreshConfig(MLog.java:73)     at com.mchange.v2.log.MLog.<clinit>(MLog.java:51) ---- The cause of this issue is under investigation. You can work around this issue by setting the following property in your application: ---- System.setProperty("com.mchange.v2.log.MLog", "com.mchange.v2.log.jdk14logging.Jdk14MLog"); ----
    • Documented as Known Issue
    • Workaround Exists
    • Hide

      I can confirm that the workaround, setting the property in application:
      System.setProperty("com.mchange.v2.log.MLog", "com.mchange.v2.log.jdk14logging.Jdk14MLog");
      solves the issue.

      Show
      I can confirm that the workaround, setting the property in application: System.setProperty("com.mchange.v2.log.MLog", "com.mchange.v2.log.jdk14logging.Jdk14MLog"); solves the issue.

      The mchange-commons-java raises error on IBMJDK. Here is the stacktrace with root cause:

      java.lang.ClassNotFoundException: org.slf4j.ILoggerFactory
      	at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source)
      	at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source)
      	at java.lang.Class.forNameImpl(Native Method)
      	at java.lang.Class.forName(Class.java:199)
      	at com.mchange.v2.log.MLog.findByClassnames(MLog.java:143)
      	at com.mchange.v2.log.MLog.refreshConfig(MLog.java:73)
      	at com.mchange.v2.log.MLog.<clinit>(MLog.java:51)
      

            gbadner@redhat.com Gail Badner (Inactive)
            lfuka Libor Fuka
            Jan Štefl Jan Štefl
            David Michael David Michael (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: