[JBossWS] - Re: java.lang.NullPointerException with EJB 3 stateless web
by jaikiran
"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
16 years, 4 months
[JBossWS] - java.lang.NullPointerException with EJB 3 stateless web ser
by longbeach
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175171#4175171
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175171
16 years, 4 months
[JBossWS] - Jar file for org.jboss.ws.core.soap.SAAJMetaFactoryImpl.clas
by thorstenschmid
The class org.jboss.ws.core.soap.SAAJMetaFactoryImpl.class is declared in the file META-INF/services/javax.xml.soap.MetaFactory in jboss-saaj.jar.
Unfortunately I cannot find any jar file where org.jboss.ws.core.soap.SAAJMetaFactoryImpl.class is included.
Does anyone know which jar file or maven artifact includes this class?
Without it I get the following exception when starting a web application using JAX-WS on JBoss 4.3:
Caused by: java.lang.IllegalStateException: Failed to load javax.xml.soap.MetaFactory: org.jboss.ws.core.soap.SAAJMetaFactoryImpl
| at javax.xml.soap.SAAJFactoryLoader.loadFactory(SAAJFactoryLoader.java:131)
| at javax.xml.soap.SAAJMetaFactory.getInstance(SAAJMetaFactory.java:60)
| at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:106)
| at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:178)
| at com.sun.xml.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:83)
| ... 140 more
| Caused by: java.lang.ClassNotFoundException: org.jboss.ws.core.soap.SAAJMetaFactoryImpl
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
| at javax.xml.soap.SAAJFactoryLoader.loadFactory(SAAJFactoryLoader.java:125)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174938#4174938
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174938
16 years, 4 months