[jboss-user] [JBossWS] - Re: java.lang.NullPointerException with EJB 3 stateless web
jaikiran
do-not-reply at jboss.com
Tue Sep 9 04:50:42 EDT 2008
"longbeach" wrote :
| It deploys with jre 1.5 but it fails miserably using jre 1.6.
I don't know how you got this working on jre 1.5. I tried out a simple example in my application:
package org.myapp.webservice;
|
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
| import javax.jws.soap.SOAPBinding.Style;
|
| @WebService
| @SOAPBinding(style = Style.RPC)
| public interface AppService {
|
| void sayHello(String user);
|
| }
|
| package org.myapp.webservice;
|
| import javax.jws.WebService;
|
| @WebService (endpointInterface="org.myapp.webservice.AppService")
| public class AppServiceImpl implements AppService {
|
| public void sayHello(String user) {
| System.out.println("Hello " + user);
|
| }
|
|
| }
|
Packaged this in a EAR file and placed it in deploy folder of JBoss-5 CR1 with JDK 1.5
13:54:30,148 INFO [ServerInfo] Java version: 1.5.0_10,Sun Microsystems Inc.
| 13:54:30,257 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_10-b03,Sun Microsystems Inc.
| 13:54:30,257 INFO [ServerInfo] OS-System: Windows 2003 5.2,x86
|
Started JBoss. But the startup failed with the same exception as what you see:
| 13:55:52,195 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/D:/jboss-5.0.0.CR1/server/jaikiran/deploy/ZEJB3Persistence.ear/ state=PreReal mode=Manual requiredState=Real
| org.jboss.deployers.spi.DeploymentException: Error during deploy: vfsfile:/D:/jboss-5.0.0.CR1/server/jaikiran/deploy/ZEJB3Persistence.ear/myapp_ejb3.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(Thread.java:595)
| 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
| 13:55:52,305 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
| 13:55:52,305 INFO [NativeServerConfig] 3.0.2.GA
|
Going by the logs, this looks like deployment ordering issue in CR1.
As a workaround, i stopped JBoss. Removed the EAR from the deploy folder of JBoss. Then started JBoss (without the EAR file). Once the server had started successfully, i copied the EAR containing this webservice to the deploy folder. The hot deployer picked up the deployment and successfully deployed the applicaiton.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175234#4175234
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175234
More information about the jboss-user
mailing list