[JBossWS] - java.lang.LinkageError
by limousyf
Hello,
I have a weird error trying to use my newly generated WS.
The problem occurs on the client side :
| Caused by: java.lang.LinkageError: Class javax/xml/soap/AttachmentPart violates loader constraints
| at java.lang.ClassLoader.defineClass1(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
| at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
| at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815)
| at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:869)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1322)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:164)
| at $Proxy70.<clinit>(Unknown Source)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:588)
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:331)
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:211)
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:148)
| at javax.xml.ws.Service.getPort(Service.java:116)
| at authentification.bean.session.AuthentificationService.getAuthentificationPort(AuthentificationService.java:56)
| at bsa.admin.view.StartBean.login(StartBean.java:114)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
| ... 38 more
|
This linkage error results in a ClassNotFoundException.
Here is the code of my WebserviceClient:
| @WebServiceClient(name = "AuthentificationService", targetNamespace = "http://session.bean.authentification/", wsdlLocation = "http://localhost:8080/AuthentificationService/Authentification?wsdl")
| public class AuthentificationService
| extends Service
| {
|
| private final static URL AUTHENTIFICATIONSERVICE_WSDL_LOCATION;
|
| static {
| URL url = null;
| try {
| url = new URL("http://localhost:8080/AuthentificationService/Authentification?wsdl");
| } catch (MalformedURLException e) {
| e.printStackTrace();
| }
| AUTHENTIFICATIONSERVICE_WSDL_LOCATION = url;
| }
|
| public AuthentificationService(URL wsdlLocation, QName serviceName) {
| super(wsdlLocation, serviceName);
| }
|
| public AuthentificationService() {
| super(AUTHENTIFICATIONSERVICE_WSDL_LOCATION, new QName("http://session.bean.authentification/", "AuthentificationService"));
| }
|
| /**
| *
| * @return
| * returns Authentification
| */
| @WebEndpoint(name = "AuthentificationPort")
| public Authentification getAuthentificationPort() {
| return (Authentification)super.getPort(new QName("http://session.bean.authentification/", "AuthentificationPort"), Authentification.class);
| }
|
| }
|
And now the (supposely) not linked Authentification.class
| @WebService(name = "Authentification", targetNamespace = "http://session.bean.authentification/")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public interface Authentification {
|
|
| /**
| *
| * @param arg1
| * @param arg0
| * @return
| * returns authentification.bean.session.User
| */
| @WebMethod
| @WebResult(partName = "return")
| public User authenticate(
| @WebParam(name = "arg0", partName = "arg0")
| String arg0,
| @WebParam(name = "arg1", partName = "arg1")
| String arg1);
|
| /**
| *
| * @param arg1
| * @param arg0
| * @return
| * returns net.java.dev.jaxb.array.StringArray
| */
| @WebMethod
| @WebResult(partName = "return")
| public StringArray getRoles(
| @WebParam(name = "arg0", partName = "arg0")
| int arg0,
| @WebParam(name = "arg1", partName = "arg1")
| int arg1);
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127865#4127865
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127865
16 years, 11 months
[JBossWS] - wsconsume generates annotations instead of xml file
by limousyf
Hello,
We develop 2 years ago an application using jbossws and jboss-ide (it was version 1.6).
Today we have moved to Seam and it's way easier to make WS.
The problem is to maintain the old-fashioned jaxrpc-mapping.xml and the newly generated annotated mapping.
Concretely we want the client to keep generating mapping with an xml file, from the wsdl moving on the server side.
But I didn't found any way with today's wsconsume to generate mapping classes and jaxrpc-mapping.xml (we were doing it graphicly with jboss-ide two years ago !)
Here is the constraints I identified (tell me if I'm wrong):
*) Our old applications runs using jsf 1.1 (myfaces) on jboss-4.0.5
*) Our new applications runs using jsf 1.2 (sun-ri) on seam/jboss-4.2.1
*) We can't run (or painfully maybe ?) both jsf-1.1/jsf-1.2 on the same jboss-4.2.1 server. So we can't upgrade our old applications to 4.2.1 ...
*) We can't find any options on the wsconsume command line (gasp) tool to generate the jaxrpc-mapping.xml. So we can't "downgrade" the wsdl schema to our old fashionned mapping.
I'm quite sure I missed something here, so what do you think is the best path:
1) Upgrade our old applications to an annotated mapping, implying we can run both jsf-1.1 and jsf-1.2 applications on the same server
2) "Downgrade" the mapping by using correctly the wsconsume command line tool (but how ?)
Thanks for your help on this.
Regards,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127545#4127545
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127545
16 years, 11 months