glassfish
  1. glassfish
  2. GLASSFISH-412

EJB endpoint deployment bug with @WebService.name

    Details

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

      Operating System: All
      Platform: All

    • Issuezilla Id:
      412

      Description

      I'm having trouble deploying the following (but without the @WebService.name
      attribute it deploys OK). It seems that when I use the @WebService.name
      attribute, I am required to include an ejb-jar.xml in my EJB-JAR. As far as I
      can tell, the problem is that when I do not include the ejb-jar.xml, Glassfish
      generates one, but instead of picking up the @WebService.name for the ejb-name,
      it generates an ejb-jar.xml with the default value of "Hello" for the ejb-name.
      Then, during deployment, there is a mismatch between the annotation and the
      descriptor, causing the server.log error shown below. This is my best guess
      about what is going on - I'm still a little confused about how @Stateless
      deployment works.

      Is this a bug - or is the ejb-jar.xml only optional when I do not use the
      @WebService.name?

      @WebService(serviceName="ServiceNameXXX", name="NameXXX")
      @Stateless
      public class Hello {

      public String sayHello(String s)

      { return "Hello: " + s; }

      }

      Here is the ejb-jar.xml that I need to use when deploying the above:

      <enterprise-beans>
      <session>
      <display-name>MyDisplayName</display-name>
      <ejb-name>NameXXX</ejb-name>
      <ejb-class>samples.Hello</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <security-identity>
      <use-caller-identity/>
      </security-identity>
      </session>
      </enterprise-beans>
      </ejb-jar>

      Doing a little more investigation, I found that, even with an ejb-jar.xml, this
      bug shows up. It seems that the Glassfish deployment process is, at some point
      expecting a bean with a name equal to the @WebService.name value. As far as I
      know, the bean name should be taken from the @Stateless.name - right?

      So, I tried this:

      @WebService(serviceName="ServiceNameXXX", name="NameXXX")
      @Stateless(name="NameXXX")
      public class Hello {

      and it deploys. So, it seems that a requirement for successful deployment is
      @WebService.name = @Stateless.name. I think this is bug. I've read through
      JSR-109 and don't see anything that would imply a relationship like that.

      The server log gives this:

      [#|2006-03-14T07:05:38.564-0500|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=80;_ThreadName=Thread-108;_RequestID=e6e89578-8a37-4428-8291-82413ee7cd7c;|Exception
      occured in J2EEC Phase
      com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading
      deployment descriptors for module [deploy-ssb-hello-1.0] – Referencing error:
      This bundle has no bean of name [NameXXX]at
      com.sun.enterprise.deployment.annotation.AnnotationInfo@ce69fc
      at
      com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:362)
      at
      com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:394)
      at
      com.sun.enterprise.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:134)
      at
      com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:160)
      at
      com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
      at
      com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
      at
      com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:848)
      at
      com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:260)
      at
      com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:716)
      at
      com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:165)
      at
      com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:194)
      Caused by: java.lang.IllegalStateException: Referencing error: This bundle has
      no bean of name [NameXXX]at
      com.sun.enterprise.deployment.annotation.AnnotationInfo@ce69fc
      at
      com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:340)
      at
      com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:200)
      at
      com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:746)
      at
      com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:727)
      at
      com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:327)
      ... 10 more
      Caused by: Referencing error: This bundle has no bean of name [NameXXX]at
      com.sun.enterprise.deployment.annotation.AnnotationInfo@ce69fc
      at
      com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:334)
      at
      com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:342)
      at
      com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:256)
      at
      com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:162)
      at
      com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:116)
      at
      com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:429)
      at
      com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:322)
      ... 14 more
      Caused by: java.lang.IllegalArgumentException: Referencing error: This bundle
      has no bean of name [NameXXX]
      at
      com.sun.enterprise.deployment.EjbBundleDescriptor.getEjbByName(EjbBundleDescriptor.java:258)
      at
      com.sun.enterprise.deployment.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHandler.java:347)
      at
      com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:311)
      ... 20 more

      #]

        Activity

        Hide
        vijaysr added a comment -

        started

        Show
        vijaysr added a comment - started
        Hide
        vijaysr added a comment -

        taking ownership

        Show
        vijaysr added a comment - taking ownership
        Hide
        vijaysr added a comment -

        started

        Show
        vijaysr added a comment - started
        Hide
        vijaysr added a comment -

        Fix checked in

        Show
        vijaysr added a comment - Fix checked in

          People

          • Assignee:
            vijaysr
            Reporter:
            khookguy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: