glassfish
  1. glassfish
  2. GLASSFISH-17204

Got IllegalStateException when deploying a Webloig test application to GlassFish

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 4.0_b75
    • Component/s: web_services
    • Labels:
      None
    • Environment:

      Windows XP

      Description

      File this bug as per management's request...
      I tried to use a weblogic test war file on glassfish and I could
      not deploy it. The error said:
      "Error occurred during deployment: Exception while deploying the app
      [Echo] : Servlet [EchoServiceServlethttp] and Servlet [EchoService] have
      the same url pattern: [/EchoService]at
      org.glassfish.apf.AnnotationInfo@158530c. Please see server.log for more
      details."

      The server.log and the test war file have been attached to the bug.
      Please note that the same test app works for WebLogic and I could deploy and run the test successfully.

        Activity

        Hide
        Hong Zhang added a comment -

        Assign to Rama to see if this is an expected exception with GlassFish. Rama had some previous discussions with Sonia on this already.

        Show
        Hong Zhang added a comment - Assign to Rama to see if this is an expected exception with GlassFish. Rama had some previous discussions with Sonia on this already.
        Hide
        scatari added a comment -

        Not critical for 3.1.2.

        Show
        scatari added a comment - Not critical for 3.1.2.
        Hide
        ramapulavarthi added a comment -

        There are two issues with the deployment error thrown as in the bug description.
        (1) The linking between Web Service class and web services.xml is mainly using port-component-name in web services.xml which should be equal to the value of @WebService(name) element or defaults to Impl class. Here they are different, JAX-WS runtime sees them as different endpoints and processes the annotations and tries to register another JAX-WS endpoint at the url pattern /EchoService.

        (2) It is a JAX-RPC web service with jaxrpc-mapping file specified in the web services.xml, Glassfish does not support JAX-RPC web services with JSR-181 annotations.

        Supporting (2) is a lot of work involved in JAX-RPC runtime code.

        Giving a more meaningful error for (1) that it is a unsupported combination would be make it clear for the user. 109 runtime can be patched to see if another endpoint is registered at the url pattern and throw some meaningful error but this is not critical for 3.1.x releases as such there are issues with port-component-name specified by the user.

        Show
        ramapulavarthi added a comment - There are two issues with the deployment error thrown as in the bug description. (1) The linking between Web Service class and web services.xml is mainly using port-component-name in web services.xml which should be equal to the value of @WebService(name) element or defaults to Impl class. Here they are different, JAX-WS runtime sees them as different endpoints and processes the annotations and tries to register another JAX-WS endpoint at the url pattern /EchoService. (2) It is a JAX-RPC web service with jaxrpc-mapping file specified in the web services.xml, Glassfish does not support JAX-RPC web services with JSR-181 annotations. Supporting (2) is a lot of work involved in JAX-RPC runtime code. Giving a more meaningful error for (1) that it is a unsupported combination would be make it clear for the user. 109 runtime can be patched to see if another endpoint is registered at the url pattern and throw some meaningful error but this is not critical for 3.1.x releases as such there are issues with port-component-name specified by the user.
        Hide
        Lukas Jungmann added a comment -

        meaningful error message will be provided as suggested by Rama, and annotation processing will be skipped in this case

        Show
        Lukas Jungmann added a comment - meaningful error message will be provided as suggested by Rama, and annotation processing will be skipped in this case
        Hide
        Lukas Jungmann added a comment -
        Show
        Lukas Jungmann added a comment - severe log message added in http://java.net/projects/glassfish/sources/svn/revision/59408

          People

          • Assignee:
            Lukas Jungmann
            Reporter:
            sonialiu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: