[JBossWS] - Client jar interfering with server-side WS
by shadowfury
Our application has both server-side web services (EJB3 stateless bean exposed via annotations) and web service client components, completely separate components. The client uses a couple required jars provided by the host that the client interfaces with, and one of these jars contains a class that's interfering with the server-side web services. Any call made to the exposed EJB throws the following exception:
2008-07-23 16:45:45,697 ERROR [ContainerBase] http-localhost%2F127.0.0.1-8080-1 Servlet.service() for servlet MyService threw exception
java.lang.AbstractMethodError: weblogic.webservice.core.soap.SOAPElementImpl.setAttributeNS(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
at org.jboss.wsf.common.DOMUtils.copyAttributes(Unknown Source)
at org.jboss.ws.core.soap.SOAPFactoryImpl.createElement(SOAPFactoryImpl.java:125)
at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:124)
at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:96)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:262)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:185)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:389)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:613)
The weblogic.webservice.core.soap.SOAPElementImpl is from the client jar, when what it should be using (I'm assuming) is org.jboss.ws.core.soap.SOAPElementImpl from one of the jbossws-*.jar's. How do I tell JBoss to use the correct one for the server-side stuff and not break the client component?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166243#4166243
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166243
16 years, 5 months
[JBossWS] - NPE when web services are shut down
by adinn
Hi guys,
I found a problem in shutdown processing for JBossWS Native 3.0.2 on 5.0.0.CR1. I'm getting NullPointerExceptions from BareWSFRuntime.stop() as web services are being undeployed. This occurs both for an application web service (the XTS demo) and for the web services deployed in the XTS sar as part of the XTS implementation.
The stack traces are as follows
| 13:32:45,437 ERROR [WebServiceDeployerPostJSE] Error during undeploy: vfszip:/home/adinn/jboss/jbossas/JBoss_5_0_0_CR1/build/output/jboss-5.0.0.CR1/server/default/deploy/jbossxts.sar/ws-t11.war
| java.lang.NullPointerException
| at org.jboss.wsf.container.jboss50.BareWSFRuntime.stop(BareWSFRuntime.java:71)
| at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.undeploy(ArchiveDeployerHook.java:109)
| at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalUndeploy(AbstractWebServiceDeployer.java:68)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:197)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1189)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1144)
| at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
| at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1406)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1064)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:677)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:510)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unload(ProfileServiceBootstrap.java:371)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unloadProfile(ProfileServiceBootstrap.java:332)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:160)
| at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:508)
| at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:827)
|
| 13:32:45,438 ERROR [WebServiceDeployerPostJSE] Error during undeploy: vfszip:/home/adinn/jboss/jbossas/JBoss_5_0_0_CR1/build/output/jboss-5.0.0.CR1/server/default/deploy/jbossxts.sar/ws-c11.war
| java.lang.NullPointerException
| at org.jboss.wsf.container.jboss50.BareWSFRuntime.stop(BareWSFRuntime.java:71)
| at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.undeploy(ArchiveDeployerHook.java:109)
| at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalUndeploy(AbstractWebServiceDeployer.java:68)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:197)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1189)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1144)
| at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
| at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1406)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1064)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:677)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:510)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unload(ProfileServiceBootstrap.java:371)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unloadProfile(ProfileServiceBootstrap.java:332)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:160)
| at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:508)
| at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:827)
|
| 13:32:45,437 ERROR [WebServiceDeployerPostJSE] Error during undeploy: vfszip:/home/adinn/jboss/jbossas/JBoss_5_0_0_CR1/build/output/jboss-5.0.0.CR1/server/default/deploy/jbossxts.sar/ws-t11.war
| java.lang.NullPointerException
| at org.jboss.wsf.container.jboss50.BareWSFRuntime.stop(BareWSFRuntime.java:71)
| at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.undeploy(ArchiveDeployerHook.java:109)
| at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalUndeploy(AbstractWebServiceDeployer.java:68)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:197)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1189)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1144)
| at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
| at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1406)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1064)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:677)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:510)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unload(ProfileServiceBootstrap.java:371)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unloadProfile(ProfileServiceBootstrap.java:332)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:160)
| at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:508)
| at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:827)
| 13:32:45,438 ERROR [WebServiceDeployerPostJSE] Error during undeploy: vfszip:/home/adinn/jboss/jbossas/JBoss_5_0_0_CR1/build/output/jboss-5.0.0.CR1/server/default/deploy/jbossxts.sar/ws-c11.war
| java.lang.NullPointerException
| at org.jboss.wsf.container.jboss50.BareWSFRuntime.stop(BareWSFRuntime.java:71)
| at org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.undeploy(ArchiveDeployerHook.java:109)
| at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalUndeploy(AbstractWebServiceDeployer.java:68)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:197)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1189)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1144)
| at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
| at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1406)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1064)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:677)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:510)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unload(ProfileServiceBootstrap.java:371)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.unloadProfile(ProfileServiceBootstrap.java:332)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:160)
| at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:508)
| at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:827)
|
The WSFRuntime has a null value in its deploymentManager field. This can only happen if it has not been initialised after creation. I debugged the error and noticed that ArchiveDeployerHook.undeploy will create a new runtime when shutting down a web service if the current runtime is null.
Presumably this is happening because the runtime which started the web services has been closed down before the web services and then a new instance recreated by ArchiveDeployerHook in an environment where it cannot obtain a deploymentManager when it initialises.
Please note that the XTS service does not declare a service/bean dependency on JBossWS because of another issue to do with start-up (see JBWS-2246). Nevertheless, the problem is obviously not just to do with service dependencies because the XTS demo application is a simple app rather than a service and should not be expected to declare dependencies upon JBossWS services/beans in order to be started and stopped correctly.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166135#4166135
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166135
16 years, 5 months
[JBossWS] - Casting to StubExr leads to ClassCastException
by gressho
Hello,
I'm trying to add WS-Security to my web services which are running fine
without. I generated the client code with Netbeans 6.1 and built the
following class to use it. I added all jars from wsrunclient to the classpath
of my project and tried to run it. The result was
anonymous wrote :
| java.lang.ClassCastException: $Proxy31 cannot be cast to org.jboss.ws.core.StubExt
| at javaapplication1.Main.main(Main.java:33)
|
My code:
| /*
| * To change this template, choose Tools | Templates
| * and open the template in the editor.
| */
|
| package javaapplication1;
|
| import de.wwu.services.mailservice.Charset;
| import de.wwu.services.mailservice.Recipient;
| import de.wwu.services.mailservice.RecipientType;
| import java.io.File;
| import java.net.URL;
| import org.jboss.ws.core.StubExt;
|
| /**
| *
| * @author gressho
| */
| public class Main {
|
| /**
| * @param args the command line arguments
| */
| public static void main(String[] args) {
|
| try { // Call Web Service Operation
| de.wwu.services.mailservice.NotificationService service = new de.wwu.services.mailservice.NotificationService();
| de.wwu.services.mailservice.NotificationEndpoint port = service.getNotificationEndpointPort();
| URL securityURL = new File("META-INF/jboss-wsse-client.xml").toURI().toURL();
| URL securityConfig= new File("META-INF/standard-jaxws-client-config.xml").toURI().toURL();
| ((StubExt)port).setSecurityConfig(securityConfig.toExternalForm());
| ((StubExt)port).setConfigName("Standard WSSecurity Client");
| // TODO initialize WS operation arguments here
| de.wwu.services.mailservice.Message message = new de.wwu.services.mailservice.Message();
| message.setCharset(Charset.UTF_8);
| Recipient firstRecipient = new Recipient();
| firstRecipient.setRecipientType(RecipientType.TO);
| firstRecipient.setRecipientAddress("gressho(a)uni-muenster.de");
| message.getRecipients().add(firstRecipient);
| message.setSender("gressho(a)uni-muenster.de");
| message.setSubject("Clustertest");
| message.setContent("Diese Mail ist ein Test... Also gleich wegschmeiÃÂen!");
| port.NotifyRecipients(message);
| } catch (Exception ex) {
| ex.printStackTrace();
| // TODO handle custom exceptions here
| }
|
| // TODO code application logic here
| }
|
| }
|
Every help is appreciated
Werner
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166131#4166131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166131
16 years, 5 months