[JBossWS] - java.lang.LinkageError: loader constraint violation:(In JAXW
by GajananM
I created one simple webservice using Jaxws in eclipse and I am using JBOSS5.0 for deployment. After deploying, wsdl is getting published on server. I could create & run a Java POJO client to access the web service successfully, but whenever I am creating a web client for the webservice, I am getting errors.
Below code is my webservice client:
XYZService xyzService=new XYZService();
XYZ xyz=xyzService.getXYZPort();
out.println(xyz.sayHello("Welcome"));
System.out.println(xyz.sayHello("Welcome"));
Webservice:
package com.sun.j2ee.blueprints.opc.powebservice;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@WebService(name = "XYZ")
@SOAPBinding
(
style = SOAPBinding.Style.DOCUMENT,
use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
)
public class XYZ {
@WebMethod
public String sayHello(@WebParam(name = "name")String name)
{
return "Patni"+name;
}
}
Following is the trace on the server console:
16:04:17,572 ERROR [[Sample]] Servlet.service() for servlet Sample threw exception
java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.(Ljava/net/URL;Ljavax/xml/namespace/QName;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/j2ee/blueprints/opc/powebservice/XYZService, and the class loader (instance of ) for resolved class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature
at com.sun.j2ee.blueprints.opc.powebservice.XYZService.(XYZService.java:41)
at com.sun.j2ee.blueprints.opc.powebservice.Sample.service(Sample.java:32)
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:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
16:15:40,784 ERROR [[Sample]] Servlet.service() for servlet Sample threw exception
java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.(Ljava/net/URL;Ljavax/xml/namespace/QName;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/sun/j2ee/blueprints/opc/powebservice/XYZService, and the class loader (instance of ) for resolved class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature
at com.sun.j2ee.blueprints.opc.powebservice.XYZService.(XYZService.java:41)
at com.sun.j2ee.blueprints.opc.powebservice.Sample.service(Sample.java:32)
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:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Please help me in resolving the error.. Thanks!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220201#4220201
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220201
15 years, 9 months
[JBossWS] - Issue with no parameter WS methods
by kringdahl
When using Native 3.0.5.GA, I am seeing an issue calling no-parameter WS methods. I have 2 of them. The first appears to go through correctly. The 2nd appears fail in the SOAP binding. The stack trace I am seeing is:
2009-03-22 22:09:28,340 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console].[HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor threw exception
| org.jboss.ws.WSException: Cannot find child element: {http://service.vmgr.desktone.com/VMgrService}retrieveAllStorageConfigsResponse
| at org.jboss.ws.core.CommonSOAPBinding.getParameterFromMessage(CommonSOAPBinding.java:917)
| at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:634)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:381)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:291)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
| at $Proxy154.retrieveAllStorageConfigs(Unknown Source)
| at com.desktone.server.accessFabric.FabricDelegateImpl.retrieveAllStorageConfigs(FabricDelegateImpl.java:4502)
| at com.desktone.server.accessFabric.service.FabricDelegateService.retrieveAllStorageConfigs(FabricDelegateService.java:1265)
In fact, no matter how many no-param methods I have, only 1 of them works. So, I also understand that SOAP does not uniquely identify methods by their signature but rather by their parameters. So, is this really a limitation? If so, any easier workaround than including a bogus parameter?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220111#4220111
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220111
15 years, 9 months