4 Replies Latest reply on Aug 3, 2010 6:44 AM by Michael Schuetz

    "Duplicate" deployment exception logging detracts from JBoss AS usability

    Lincoln Baxter III Master

      When using JBoss AS (6 M{X} in this case) - deployment errors can be critical for debugging botched configurations in web-applications. In fact, looking through the stack trace the only way to find out what's wrong, and why your app isn't deploying.

       

      That's fine. The problem comes when the exception message is duplicated or even hidden by numerous exceptions that pile up in the log, effectively turning the next minute or so into a duck hunt, weeding through exceptions until you find the one line that you're really looking for.

       

      I think JBoss AS/MC should be more selective when displaying exceptions.

       

      For example: http://pastebin.com/NjjXLuiF - In this case, I don't even want to see an exception. I've simply got a Servlet that can't be resolved to a class, and all really I care about is:

       

      {code}

      DEPLOYMENTS IN ERROR:
        Deployment "vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/" is in error due to the following reason(s): java.lang.ClassNotFoundException: com.sun.FooServlet from BaseClassLoader@1e05df6d{vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/}
      {code}


       

      It would be even nicer if I were told that I had a bad Servlet definition in web.xml, but instead, I get all of this... which isn't really helpful to an end-user. (Granted, in this case all of the exceptions actually contain the same  root cause, but in some cases that doesn't happen - I certainly don't want duplicate exceptions.)

       

      I'd like to open a JIRA for this. It's relatively low-hanging fruit that could help smoothe the developer experience.

       

      Also, imagine that you are reading this message on a non-wrapping terminal, such as this website -- it's painful to have to scroll over and find the root cause at the end of the deployment failure message -- it would be nice if that message were closer to the beginning of the line, so I could immediately see the issue, then get details if I want them.

       

      {code}

      11:56:14,884 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] undeploy, ctxPath=/pretty-blog


      11:56:17,425 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to PreReal: name=vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/ state=PostClassLoader mode=Manual requiredState=PreReal: org.jboss.deployers.spi.DeploymentException: java.lang.ClassNotFoundException: com.sun.FooServlet from BaseClassLoader@5b20a97e{vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/}
          at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.deployApplicationClass(ResteasyScannerDeployer.java:112)
          at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.internalDeploy(ResteasyScannerDeployer.java:57)
          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:1660)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
          at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:637)
      Caused by: java.lang.ClassNotFoundException: com.sun.FooServlet from BaseClassLoader@5b20a97e{vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/}
          at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:498)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
          at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.deployApplicationClass(ResteasyScannerDeployer.java:108)
          ... 28 more

       



      11:56:17,430 WARN  [org.jboss.system.server.profileservice.hotdeploy.HDScanner] Failed to process changes: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       



      *** DEPLOYMENTS IN ERROR: Name -> Error

       



      vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/ -> org.jboss.deployers.spi.DeploymentException: java.lang.ClassNotFoundException: com.sun.FooServlet from BaseClassLoader@5b20a97e{vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/}

       




      DEPLOYMENTS IN ERROR:
        Deployment "vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/" is in error due to the following reason(s): java.lang.ClassNotFoundException: com.sun.FooServlet from BaseClassLoader@5b20a97e{vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/}

       



          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1198)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1144)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:848)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:416)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:637)

       



      11:56:18,504 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] Unable to access url jndi:/localhost/pretty-blog/WEB-INF/faces-config.xml.  Monitoring for this resource will no longer occur.
      11:56:44,856 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to PreReal: name=vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/ state=PostClassLoader mode=Manual requiredState=PreReal: org.jboss.deployers.spi.DeploymentException: java.lang.ClassNotFoundException: com.sun.FooServlet from BaseClassLoader@1e05df6d{vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/}
          at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.deployApplicationClass(ResteasyScannerDeployer.java:112)
          at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.internalDeploy(ResteasyScannerDeployer.java:57)
          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:1660)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
          at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:637)
      Caused by: java.lang.ClassNotFoundException: com.sun.FooServlet from BaseClassLoader@1e05df6d{vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/}
          at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:498)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
          at org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer.deployApplicationClass(ResteasyScannerDeployer.java:108)
          ... 28 more

       



      11:56:44,861 WARN  [org.jboss.system.server.profileservice.hotdeploy.HDScanner] Failed to process changes: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       



      *** DEPLOYMENTS IN ERROR: Name -> Error

       



      vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/ -> org.jboss.deployers.spi.DeploymentException: java.lang.ClassNotFoundException: com.sun.FooServlet from BaseClassLoader@1e05df6d{vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/}

       




      DEPLOYMENTS IN ERROR:
        Deployment "vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/" is in error due to the following reason(s): java.lang.ClassNotFoundException: com.sun.FooServlet from BaseClassLoader@1e05df6d{vfszip:/Users/lbaxter/dev/jboss-6/server/default/deploy/pretty-blog.war/}

       



          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1198)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1144)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:848)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:416)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:637)

      {code}