Skip to main content

jax-ws 2.2 test program failure in Glassfish 3.0.1

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
wasedaxiao
Offline
Joined: 2003-06-13

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"

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
569 Guest
Offline
Joined: 2010-11-10

 What you are doing (endorsed mechanism) should work. Are you sure appclient
is picking up the correct JDK ?

jitu
Offline
Joined: 2003-06-14

What you are doing (endorsed mechanism) should work. Are you sure appclient is picking up the correct JDK ?

589 Guest
Offline
Joined: 2010-11-10

I didn't do anything on Glassfish. I already set JAVA_HOME env variable so
it should pick this variable that points to jdk 6 u14 on my laptop. Or could
poing me where I can find a working TP for Glassfish 3.0.1(jax-ws 2.2)?
thanks.

wasedaxiao
Offline
Joined: 2003-06-13

I didn't do anything on Glassfish. I already set JAVA_HOME env variable so it should pick this variable that points to jdk 6 u14 on my laptop. Or could you pointing me where I can find a working TP for Glassfish 3.0.1(jax-ws 2.2)? thanks.