glassfish
  1. glassfish
  2. GLASSFISH-15562

Can't deploy EJB web service when packaged together with other non EJB WebServices

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1_b36
    • Fix Version/s: 3.1.2_b02
    • Component/s: web_services
    • Labels:
      None

      Description

      Can't deploy a war, which container regular and EJB webservices at the same time. If I split them into separate war files - everything works.
      The message I see in the console [1]
      The server.log contains [2]

      I'm attaching Netbeans project with sources and war file inside.
      When I remove regular webservice - ejb webservice gets deployed without errors.

      [1]
      [#|2011-01-13T22:29:12.539+0100|INFO|glassfish3.1|javax.enterprise.webservices.org.glassfish.webservices|_ThreadID=101;_ThreadName=Thread-1;|WS00018: Webservice Endpoint deployed
      AddNumbers listening at address at http://baterka:8080/SOAPTCPService/AddNumbersService|#]

      [2]
      [#|2011-01-13T22:29:12.574+0100|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=101;_ThreadName=Thread-1;|Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
      java.lang.RuntimeException: EJB Container initialization error
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:246)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:249)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:354)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:369)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1080)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1260)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1248)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:453)
      at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:220)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
      at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:818)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1008)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:680)
      Caused by: javax.xml.ws.WebServiceException: WS00056 : Deployment cannot proceed as the ejb has a null endpoint address uri.Potential cause may be webservice endpoints not supported in embedded ejb case
      at org.glassfish.webservices.WebServiceEjbEndpointRegistry.registerEndpoint(WebServiceEjbEndpointRegistry.java:127)
      at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1172)
      at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:202)
      at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:167)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
      ... 32 more

      #]

      [#|2011-01-13T22:29:12.590+0100|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=101;_ThreadName=Thread-1;|Exception while loading the app|#]

      [#|2011-01-13T22:29:12.615+0100|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=101;_ThreadName=Thread-1;|Exception while loading the app : EJB Container initialization error
      javax.xml.ws.WebServiceException: WS00056 : Deployment cannot proceed as the ejb has a null endpoint address uri.Potential cause may be webservice endpoints not supported in embedded ejb case
      at org.glassfish.webservices.WebServiceEjbEndpointRegistry.registerEndpoint(WebServiceEjbEndpointRegistry.java:127)
      at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1172)
      at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:202)
      at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:167)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:249)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:354)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:369)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1080)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1260)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1248)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:453)
      at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:220)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
      at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:818)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1008)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:680)

      #]

        Activity

        Hide
        Bhakti Mehta added a comment -

        Excluding for 3.1 as there is a workaround and this is too late for this fix .

        Show
        Bhakti Mehta added a comment - Excluding for 3.1 as there is a workaround and this is too late for this fix .
        Hide
        Bhakti Mehta added a comment -

        Requesting Rama to look in this issue. I think we should fix this for 3.1.1

        Show
        Bhakti Mehta added a comment - Requesting Rama to look in this issue. I think we should fix this for 3.1.1
        Hide
        scatari added a comment -

        Not a common use case and the fix is risky at this time.

        Show
        scatari added a comment - Not a common use case and the fix is risky at this time.
        Hide
        ramapulavarthi added a comment -

        This happens when some of the web services are servlet based (POJO style) and some are EJb based which are stored in different descriptors.The initial analysis of the bug gave an idea that the fix is not localized and changes in this area would need through testing of CTS and SQE tests for regressions to exercise the different scenarios of packaging.
        As this happens only when the deployment style is mixed, exclusion for v3.1 is dependent on the schedule.

        Show
        ramapulavarthi added a comment - This happens when some of the web services are servlet based (POJO style) and some are EJb based which are stored in different descriptors.The initial analysis of the bug gave an idea that the fix is not localized and changes in this area would need through testing of CTS and SQE tests for regressions to exercise the different scenarios of packaging. As this happens only when the deployment style is mixed, exclusion for v3.1 is dependent on the schedule.
        Hide
        ramapulavarthi added a comment -

        This happens because of the incorrect logic to process web services in a web module. In a web module, along with Servlet style web services, EJB Web Services also have to processed from the extension descriptor (EJBBundleDescriptor).

        Show
        ramapulavarthi added a comment - This happens because of the incorrect logic to process web services in a web module. In a web module, along with Servlet style web services, EJB Web Services also have to processed from the extension descriptor (EJBBundleDescriptor).
        Hide
        ramapulavarthi added a comment -

        Fixed in trunk:
        -----------------------------------------------
        Revision: 50610
        Author: ramapulavarthi
        Date: 2011-11-01 21:49:56 UTC
        Log Message:
        ------------
        GLASSFISH-15562: Support packaging of Servlet style and EJB Web Services together in war.
        Modified Paths:
        ---------------
        trunk/main/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServicesDeployer.java
        trunk/main/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/WebServiceEndpoint.java

        Fixed in 3.1.2 branch:
        -----------------------------------------------
        Revision: 50611
        Author: ramapulavarthi
        Date: 2011-11-01 21:57:59 UTC
        Log Message:
        ------------
        GLASSFISH-15562: Support packaging of Servlet style and EJB Web Services together in war.
        Porting Revision: 50610 from trunk to 3.1.2 branch.
        Modified Paths:
        ---------------
        branches/3.1.2/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServicesDeployer.java
        branches/3.1.2/deployment/dol/src/main/java/com/sun/enterprise/deployment/WebServiceEndpoint.java

        Added new Test:
        ---------------------------------------------
        Revision: 50614
        Author: ramapulavarthi
        Date: 2011-11-01 22:41:32 UTC
        Log Message:
        ------------
        GLASSFISH-15562: Adding test for packaging EJB and Servlet Web Services together in war.

        Modified Paths:
        ---------------
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/build.xml

        Added Paths:
        ------------
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/RepRunConf.txt
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.xml
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.properties
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloWS.java
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/README
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/web.xml
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloEjb.java
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/webclient/Client.java
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/webclient
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client/TestClient.java
        trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client-web.xml

        Show
        ramapulavarthi added a comment - Fixed in trunk: ----------------------------------------------- Revision: 50610 Author: ramapulavarthi Date: 2011-11-01 21:49:56 UTC Log Message: ------------ GLASSFISH-15562 : Support packaging of Servlet style and EJB Web Services together in war. Modified Paths: --------------- trunk/main/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServicesDeployer.java trunk/main/appserver/deployment/dol/src/main/java/com/sun/enterprise/deployment/WebServiceEndpoint.java Fixed in 3.1.2 branch: ----------------------------------------------- Revision: 50611 Author: ramapulavarthi Date: 2011-11-01 21:57:59 UTC Log Message: ------------ GLASSFISH-15562 : Support packaging of Servlet style and EJB Web Services together in war. Porting Revision: 50610 from trunk to 3.1.2 branch. Modified Paths: --------------- branches/3.1.2/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServicesDeployer.java branches/3.1.2/deployment/dol/src/main/java/com/sun/enterprise/deployment/WebServiceEndpoint.java Added new Test: --------------------------------------------- Revision: 50614 Author: ramapulavarthi Date: 2011-11-01 22:41:32 UTC Log Message: ------------ GLASSFISH-15562 : Adding test for packaging EJB and Servlet Web Services together in war. Modified Paths: --------------- trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/build.xml Added Paths: ------------ trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/RepRunConf.txt trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.xml trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.properties trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloWS.java trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/README trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/web.xml trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloEjb.java trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/webclient/Client.java trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/webclient trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client/TestClient.java trunk/v2/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client-web.xml

          People

          • Assignee:
            ramapulavarthi
            Reporter:
            oleksiys
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved: