1 Reply Latest reply on Apr 19, 2012 1:48 PM by jamezp

    org.apache.commons.logging is Implicit Dependency now?

    erhard

      From https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-ApacheCommonsLogging :

      To avoid a ClassNotFoundException, you will need to add a dependency for the module that contains those classes. The module name for Apache Commons Logging is "org.apache.commons.logging", so your MANIFEST.MF file will look like this:

      Dependencies: org.apache.commons.logging 

       

      And this is what I had to do before 7.1.0. But when I try a simple application with Apache Commons Logging (which is not packaged) in jboss-as-7.1.1.Final it works without adding dependencies. With tracing enabled I see:

       

       

       

      {code}

      23:57:31,458 TRACE [org.jboss.modules] (http--0.0.0.0-8080-1) Finding class org.apache.commons.logging.LogFactory from Module "deployment.servlet-with-logging-1.1.0.war:main" from Service Module Loader

      23:57:31,458 TRACE [org.jboss.modules] (http--0.0.0.0-8080-1) Finding local class org.apache.commons.logging.LogFactory from Module "org.slf4j.jcl-over-slf4j:main" from local module loader @4229ab3e (roots: /home/esiegl/jboss-as-7.1.1.Final/modules)

      23:57:31,459 TRACE [org.jboss.modules] (http--0.0.0.0-8080-1) Loading class org.apache.commons.logging.LogFactory locally from Module "org.slf4j.jcl-over-slf4j:main" from local module loader @4229ab3e (roots: /home/esiegl/jboss-as-7.1.1.Final/modules)

      23:57:31,460 TRACE [org.jboss.modules] (http--0.0.0.0-8080-1) Attempting to define class org.apache.commons.logging.LogFactory in Module "org.slf4j.jcl-over-slf4j:main" from local module loader @4229ab3e (roots: /home/esiegl/jboss-as-7.1.1.Final/modules)

      23:57:31,460 TRACE [org.jboss.modules] (http--0.0.0.0-8080-1) Defined class org.apache.commons.logging.LogFactory in Module "org.slf4j.jcl-over-slf4j:main" from local module loader @4229ab3e (roots: /home/esiegl/jboss-as-7.1.1.Final/modules

       

      {code}

       

       

      Also log4j seems to be added automatically. This would contradict the tabel in https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments as well?