[jboss-user] [JBossWS] - Exception while running JbossWS service client

techie_techie do-not-reply at jboss.com
Thu Dec 13 09:14:15 EST 2007


Hi,
I have a service up and running on Jboss 4.2.2 GA. I can browse the WSDL file and see the content.

Now using wsconsume I generated the client side stubs and wrote a test client. The testclient class path refers to jars in "lib" of Jboss Ws 2.0.2 "lib"
but i am getting the following exception.

Any pointers what could be missing or correct proedcure to create clients using wsconsume?
.....


  | Exception in thread "main" javax.xml.ws.WebServiceException: Unable to load Provider: Failed to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi.ProviderImpl
  | 	at javax.xml.ws.spi.Provider.provider(Provider.java:98)
  | 	at javax.xml.ws.Service.<init>(Service.java:83)
  | 	at com.danny.techtalk.ex1.echo.EchoImplService.<init>(EchoImplService.java:53)
  | 	at com.danny.techtalk.ex1.echo.TestClient2.main(TestClient2.java:12)
  | Caused by: java.lang.IllegalStateException: Failed to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi.ProviderImpl
  | 	at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:96)
  | 	at javax.xml.ws.spi.Provider.provider(Provider.java:90)
  | 	... 3 more
  | Caused by: java.lang.ExceptionInInitializerError
  | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  | 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
  | 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
  | 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
  | 	at java.lang.Class.newInstance0(Unknown Source)
  | 	at java.lang.Class.newInstance(Unknown Source)
  | 	at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:91)
  | 	... 4 more
  | Caused by: javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference. 
  | 	at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:188)
  | 	at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:65)
  | 	... 11 more
  | Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
  | Two classes have the same XML type name "address". Use @XmlType.name and @XmlType.namespace to assign different names to them.
  | 	this problem is related to the following location:
  | 		at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
  | 		at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
  | 		at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
  | 	this problem is related to the following location:
  | 		at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
  | 		at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address
  | 		at javax.xml.ws.wsaddressing.W3CEndpointReference
  | Two classes have the same XML type name "elements". Use @XmlType.name and @XmlType.namespace to assign different names to them.
  | 	this problem is related to the following location:
  | 		at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
  | 		at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
  | 		at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
  | 	this problem is related to the following location:
  | 		at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements
  | 		at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax.xml.ws.wsaddressing.W3CEndpointReference.referenceParameters
  | 		at javax.xml.ws.wsaddressing.W3CEndpointReference
  | 
  | 	at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:66)
  | 	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)
  | 	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:270)
  | 	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:103)
  | 	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:81)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
  | 	at javax.xml.bind.ContextFinder.find(ContextFinder.java:366)
  | 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
  | 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
  | 	at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:186)
  | 	... 12 more
  | 

TIA...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112569#4112569

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112569



More information about the jboss-user mailing list