Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-9446

Setting up of application specific logging context still does not work


    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.1.0
    • Fix Version/s: None
    • Component/s: Logging
    • Labels:
    • Environment:

      JBoss AS 6.1.0.Final


      I have cloned JBAS-9407 (https://issues.jboss.org/browse/JBAS-9407) because the fix does not work.

      Yes, the "java.lang.RuntimeException: Error configuring property:" is fixed.

      But the functionality still does not work. The logging goes to server.log anyway. Reason: the proposed workaround was used as a fix. The workaround is not complete.

      That mode="On Demand" must be removed so that the configuration looks like

      <!-- Workaround for JBoss Logging bug http://community.jboss.org/message/587287#587287 -->
      <bean name="JBossLogManagerContextSelectorService" class="org.jboss.logmanager.ClassLoaderLogContextSelector"/>
         <bean name="OnDemandJBossLogManagerContextSelectorService" class="org.jboss.logmanager.LogContextSelectorService">
            <property name="selector">
               <inject bean="JBossLogManagerClassLoaderContextSelectorService"/>

      But this is not enough. There is also an NPE when the application is undeployed.

      14:33:50,546 ERROR [org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer] Error during undeploy: Logging:REGISTRATION:MyAppLogContext:Anonymous-5: java.lang.NullPointerException
      	at org.jboss.logging.metadata.GetClassLoaderBeanMetaData.setClassLoader(GetClassLoaderBeanMetaData.java:52)
      	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:237)
      	at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:58)

      Unfortunately there is no workaround.

      I have created a patch that fixes this NPE and correctly (or so I think) configures per-application logging. This time it is really lazy.

      The patch can't be done to a single project. 2 projects are affected:
      1. logging-service-metadata (http://anonsvn.jboss.org/repos/jbossas/projects/logging-service-metadata/tags/1.0.0.CR10)
      2. JBoss AS 6 (http://anonsvn.jboss.org/repos/jbossas/tags/6.1.0.Final)

        Gliffy Diagrams


            Issue Links



                • Assignee:
                  klv_m72 Leonid Kosmylev
                • Votes:
                  4 Vote for this issue
                  4 Start watching this issue


                  • Created: