users@glassfish.java.net

jax-ws 2.2 test program failure in Glassfish 3.0.1

From: <forums_at_java.net>
Date: Tue, 09 Nov 2010 20:38:53 -0800

I am writing a test program that is run on Glassfish 3.0.1 and jdk 6 u14.
but when I ran the client it threw the following error.  It seems one new
constructor of  javax.xml.ws.Service that is added since jax-ws 2.2 is used
and the correct class is not in CLASSPATH. How I can fix this problem?
I tried endorsed mechanism(put webservices-api-osgi.jar and
jaxb-api-osgi.jar under jre/lib/endorsed) in jdk 6 but it did not work.

$ $GLASSFISH_HOME/bin/appclient   client.WSClient

java.lang.reflect.InvocationTargetException

 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:597)

 at
sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)

 at
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)

Caused by: java.lang.NoSuchMethodError:
javax.xml.ws.Service.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;[Ljavax/xml/ws/WebServiceFeature;)V

 at
com.javaee6.jaxws.mtom.MyMTOMTestService.<init>(MyMTOMTestService.java:46)

 at client.WSClient.<clinit>(WSClient.java:12)

 at java.lang.Class.forName0(Native Method)

 at java.lang.Class.forName(Class.java:247)

 at
org.glassfish.appclient.client.AppClientFacade.createContainerForClassName(AppClientFacade.java:484)

 at
org.glassfish.appclient.client.AppClientFacade.createContainer(AppClientFacade.java:436)

 at
org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:256)

 at
org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:75)

 ... 6 more

FATAL ERROR in native method: processing of -javaagent failed
Exception in thread "main"


--
[Message sent by forum member 'wasedaxiao']
View Post: http://forums.java.net/node/714980