glassfish
  1. glassfish
  2. GLASSFISH-13552

deploy error not as clear as with GFv2.1.1 when no class found

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1
    • Fix Version/s: 4.0
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: All

    • Issuezilla Id:
      13,552

      Description

      I'm comparing deployment error messages in GFv3.1 and GFv2.1.1.
      In this WS app, a class is missing.

      On glassfish-3.1-b21-09_17_2010, the error message has four exception class
      names but nothing related to a user class missing:

      D:\GFv3.1\glassfish-3.1-b21-09_17_2010\glassfishv3>bin\asadmin deploy
      \is_classloader-web.war
      remote failure: Error occur during deployment: Exception while loading the app :
      java.lang.IllegalStateException: ContainerBase.addChild: st
      art: org.apache.catalina.LifecycleException:
      org.apache.catalina.LifecycleException: javax.servlet.ServletException. Please
      see server.log f
      or more details.

      Command deploy failed.

      The server log has many stacktraces with one having a NoClassDefFoundError with
      the missing class name in its 'caused by' part.

      On GFv2.1.1 the missing class name is included in the initial error message:

      D:\GFv2.1.1\glassfish-v2.1.1-b22\glassfish>bin\asadmin deploy
      \is_classloader-web.war
      CLI171 Command deploy failed : Deploying application in domain failed;
      annotations/server/common/AddNumbersCommon

      The server log here has only three error messages, all clearly indicating the
      missing class name and the fact that it could not be loaded.

        Activity

        Hide
        Dies Koper added a comment -

        Created an attachment (id=4925)
        test app

        Show
        Dies Koper added a comment - Created an attachment (id=4925) test app
        Hide
        Hong Zhang added a comment -

        Yes, from tracing the code, this part of the code paths have changed so the
        exception got thrown at a different place (therefore different stack traces and
        different error messages).

        I will check with webservices team to see why the code paths have changed, but
        this is something we may not be able to change.

        I do see this exception in the very beginning of the first stack trace of my
        server.log though when I deployed it to 3.1:

        [#|2010-09-21T09:25:52.549-
        0400|WARNING|glassfish3.1|javax.enterprise.webservices.org.glassfish.webservices

        _ThreadID=14;_ThreadName=Thread-1; Servlet web service endpoint 'j2w_base'
        failure
        java.lang.NoClassDefFoundError: annotations/server/common/AddNumbersCommon
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.glassfish.webservices.JAXWSServlet.registerEndpoint
        (JAXWSServlet.java:292)
        at org.glassfish.webservices.JAXWSServlet.doInit(JAXWSServlet.java:274)
        at org.glassfish.webservices.JAXWSServlet.init(JAXWSServlet.java:109)
        at org.apache.catalina.core.StandardWrapper.initServlet
        (StandardWrapper.java:1427)
        at org.apache.catalina.core.StandardWrapper.load
        (StandardWrapper.java:1229)
        at org.apache.catalina.core.StandardContext.loadOnStartup
        (StandardContext.java:5045)
        at org.apache.catalina.core.StandardContext.start
        (StandardContext.java:5337)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:497)
        at org.apache.catalina.core.ContainerBase.addChildInternal
        (ContainerBase.java:917)
        at org.apache.catalina.core.ContainerBase.addChild
        (ContainerBase.java:901)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
        at com.sun.enterprise.web.WebContainer.loadWebModule
        (WebContainer.java:1929)
        at com.sun.enterprise.web.WebContainer.loadWebModule
        (WebContainer.java:1606)
        at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100)
        ...
        Show
        Hong Zhang added a comment - Yes, from tracing the code, this part of the code paths have changed so the exception got thrown at a different place (therefore different stack traces and different error messages). I will check with webservices team to see why the code paths have changed, but this is something we may not be able to change. I do see this exception in the very beginning of the first stack trace of my server.log though when I deployed it to 3.1: [#|2010-09-21T09:25:52.549- 0400|WARNING|glassfish3.1|javax.enterprise.webservices.org.glassfish.webservices _ThreadID=14;_ThreadName=Thread-1; Servlet web service endpoint 'j2w_base' failure java.lang.NoClassDefFoundError: annotations/server/common/AddNumbersCommon at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.glassfish.webservices.JAXWSServlet.registerEndpoint (JAXWSServlet.java:292) at org.glassfish.webservices.JAXWSServlet.doInit(JAXWSServlet.java:274) at org.glassfish.webservices.JAXWSServlet.init(JAXWSServlet.java:109) at org.apache.catalina.core.StandardWrapper.initServlet (StandardWrapper.java:1427) at org.apache.catalina.core.StandardWrapper.load (StandardWrapper.java:1229) at org.apache.catalina.core.StandardContext.loadOnStartup (StandardContext.java:5045) at org.apache.catalina.core.StandardContext.start (StandardContext.java:5337) at com.sun.enterprise.web.WebModule.start(WebModule.java:497) at org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:917) at org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:901) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697) at com.sun.enterprise.web.WebContainer.loadWebModule (WebContainer.java:1929) at com.sun.enterprise.web.WebContainer.loadWebModule (WebContainer.java:1606) at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100) ...
        Hide
        Dies Koper added a comment -

        I found the NoClassDefFoundError with the class name in my old logs as first
        message. Must have missed it the first time. So there is enough info in server.log.

        This issue can focus on the (lack of useful) details in the CUI error message.

        Show
        Dies Koper added a comment - I found the NoClassDefFoundError with the class name in my old logs as first message. Must have missed it the first time. So there is enough info in server.log. This issue can focus on the (lack of useful) details in the CUI error message.
        Hide
        Hong Zhang added a comment -

        scrubbing issues

        Show
        Hong Zhang added a comment - scrubbing issues
        Hide
        Hong Zhang added a comment -

        I took a look at this again today, there is not much we can do (the message is different as the code path has changed). As the error message is pointing to the server.log where the cause could be found, I am going to downgrade the bug and revisit in the future release if needed.

        Show
        Hong Zhang added a comment - I took a look at this again today, there is not much we can do (the message is different as the code path has changed). As the error message is pointing to the server.log where the cause could be found, I am going to downgrade the bug and revisit in the future release if needed.

          People

          • Assignee:
            Hong Zhang
            Reporter:
            Dies Koper
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: