1 Reply Latest reply on Sep 9, 2008 4:53 AM by jaikiran pai

    java.lang.NullPointerException with EJB 3 stateless web ser

    Celinio Fernandes Novice

      Hi,
      I get an error while deploying a Stateless session bean defined as a web service on JBoss 5 CR1.
      It seems to be a problem of version of JRE since it works with JRE 5 but does not work with JRE 6.
      I am using Eclipse 3.4

      My interface looks like this :
      @WebService
      @SOAPBinding(style = Style.RPC)
      public interface Test extends Remote {
      ...
      }

      My bean looks like this :

      @Stateless
      @WebService(endpointInterface ="Test")
      @Remote(Test.class)
      public class TestBean {
      ...
      }

      It deploys with jre 1.5 but it fails miserably using jre 1.6. Here is the stack trace (the web services are developped inside the VenteEnLigneEJB project, with Eclipse 3.4):

      2:18:19,835 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/D:/EJB3/jboss-5.0.0.CR1/server/default/deploy/VenteEnLigne.ear state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/D:/DeveloppementEJB3/jboss-5.0.0.CR1/server/default/deploy/VenteEnLigne.ear/VenteEnLigneEJB.jar
       at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:180)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1023)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1392)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:784)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:912)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:672)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:257)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:135)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:544)
       at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NullPointerException
       at org.jboss.wsf.common.KernelAwareSPIFactory.getKernelProvidedSPI(KernelAwareSPIFactory.java:40)
       at org.jboss.wsf.framework.DefaultWSFRuntimeLocator.locateRuntime(DefaultWSFRuntimeLocator.java:36)
       at org.jboss.wsf.container.jboss50.deployer.AbstractDeployerHook.getWsfRuntime(AbstractDeployerHook.java:59)
       at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:86)
       at org.jboss.wsf.container.jboss50.deployer.AbstractDeployerHookEJB.deploy(AbstractDeployerHookEJB.java:43)
       at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:62)
       at org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:95)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
       ... 18 more
      22:18:19,899 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
      22:18:19,899 INFO [NativeServerConfig] 3.0.2.GA
      


      And the version of java that i use :

      22:17:15,871 INFO [CopyMechanism] VFS temp dir: D:\EJB3\jboss-5.0.0.CR1\server\default\tmp
      22:17:15,885 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
      22:17:16,787 INFO [ServerInfo] Java version: 1.6.0_07,Sun Microsystems Inc.
      22:17:16,787 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 10.0-b23,Sun Microsystems Inc.
      22:17:16,787 INFO [ServerInfo] OS-System: Windows Vista 6.0,x86
      



      If i comment out the annotations @Webservice on the class AND the interface, it deploys correctly, no error.

      Does anyone know what is wrong here ?

      Thanks