Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-1898

NPE in PojoEndpoint.java:110 when deploying JAX-WS application

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 7.0.1
    • 7.0.2
    • None
    • None

    Description

      A simple POJO annotated with @WebService and declared in web.xml as a servlet will produce the following NPE in server output on TomEE 7.0.1 and the endpoint will not handle requests. The same setup works on TomEE 1.7.2 however.

      SEVERE - Error deploying CXF webservice for servlet WebService
      javax.xml.ws.WebServiceException: Service resource injection failed
      	at org.apache.openejb.server.cxf.pojo.PojoEndpoint.<init>(PojoEndpoint.java:163)
      	at org.apache.openejb.server.cxf.pojo.PojoWsContainer.createEndpoint(PojoWsContainer.java:70)
      	at org.apache.openejb.server.cxf.pojo.PojoWsContainer.createEndpoint(PojoWsContainer.java:45)
      	at org.apache.openejb.server.cxf.CxfWsContainer.start(CxfWsContainer.java:50)
      	at org.apache.openejb.server.cxf.CxfService.createPojoWsContainer(CxfService.java:114)
      	at org.apache.openejb.server.webservices.WsService.afterApplicationCreated(WsService.java:420)
      	at org.apache.tomee.webservices.TomeeJaxWsService.afterApplicationCreated(TomeeJaxWsService.java:56)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.apache.openejb.observer.ObserverManager$MethodInvocation.invoke(ObserverManager.java:406)
      	at org.apache.openejb.observer.ObserverManager$InvocationList.invoke(ObserverManager.java:521)
      	at org.apache.openejb.observer.ObserverManager.doFire(ObserverManager.java:111)
      	at org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:100)
      	at org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:217)
      	at org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1707)
      	at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:116)
      	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
      	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:170)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
      	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
      	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      	at org.apache.openejb.server.cxf.pojo.PojoEndpoint.<init>(PojoEndpoint.java:110)
      	... 30 more
      

      I created a really simple maven project that reproduces the problem:

      • Download the zipped project from here
      • Run mvn package and deploy the .war
      • Start TomEE 7.0.1, notice the NPE in server log
      • Accessing SEVER_URL/jaxws-bug/WebServiceService gives an error

      The same .war deploys successfully on TomEE 1.7.2

      Attachments

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            tonis.pool@gmail.com Tõnis Pool
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: