0 Replies Latest reply on May 3, 2016 6:07 AM by Sumeeth Tewar

    JBOSS AS 6.1.0 final logger configuration. replace filter

    Sumeeth Tewar Newbie

      HI,

       

      I have a logged exception as :

       

      ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to PreReal: name=vfs:///opt/ABC/JBoss/6.1.0/jboss-as/server/profile/deploy/WSAlarm.ear state=PostClassLoader mode=Manual requiredState=PreReal: org.jboss.deployers.spi.DeploymentException: java.lang.ClassNotFoundException: org.apache.myfaces.trinidad.webapp.ResourceServlet from BaseClassLoader@20301500{vfs:///opt/ABCD/JBoss/6.1.0/jboss-as/server/profile/deploy/WSService.ear/WebserviceProject.war/}

              at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.checkDeclaredApplicationClassAsServlet(ResteasyScannerDeployer.java:257)

              at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.scan(ResteasyScannerDeployer.java:108)

              at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.internalDeploy(ResteasyScannerDeployer.java:64)

              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)

              at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143)

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240)

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192)

              at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57)

              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74)

              at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95)

              at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87)

              at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234)

              at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213)

              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150)

              at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135)

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146)

              at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90)

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

      Caused by: java.lang.ClassNotFoundException: org.apache.myfaces.trinidad.webapp.ResourceServlet from BaseClassLoader@20301500{vfs:///opt/ABC/JBoss/6.1.0/jboss-as/server/profile/deploy/WSService.ear/WebserviceProject.war/}

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

              at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.checkDeclaredApplicationClassAsServlet(ResteasyScannerDeployer.java:253)

              ... 40 more

       

      I have configured the logger to log to a specific file.

       

      I want to replace the above exception stack trace in a proper way as :

       

      Error installing to PreReal: name=vfs:///opt/ABC/JBoss/6.1.0/jboss-as/server/profile/deploy/WSAlarm.ear


      I have used a replace filter configuration in the logger as follows :


      <level name="DEBUG" />

           <handlers>

           <handler-ref name="testAppender"/>

           </handlers>

         </logger>

         <logger category="org.jboss.kernel.plugins.dependency.AbstractKernelController">

           <filter>

            <all>

                  <match pattern="Error installing to PreReal*"/>

                  <replace pattern="org.jboss:$" replacement="my specifc string"/>

            </all>

            </filter>

       

       

           <level name="ERROR" />

           <handlers>

           <handler-ref name="testAppender"/>

           </handlers>

         </logger>


      However its does not seem to work. Could someone let me know how to go about this?