Skip to main content

Java 1.5/1.6 and WebFault class

1 reply [Last post]
Anonymous

hi,

Apologies in advance if this is off base or has been addressed - I'm
pretty new to Metro and jax-ws.

It looks to me as if Metro 2.0 has a dependency on JDK 1.6, contrary to
the release notes. During startup, I get this exception:
java.lang.NoSuchMethodError:
javax.xml.ws.WebFault.messageName()Ljava/lang/String;
at
com.sun.xml.ws.model.RuntimeModeler.processExceptions(RuntimeModeler.java:1162)

The version of java.xml.ws.WebFault that's included in Metro in
webservices-api.jar does have the messageName() method, which is also in
the version of the jax-ws classes that's included in Java SE 6, but not
in previous versions. Doing "javap java.xml.ws.WebFault" confirms that
my runtime contains the old version, and unless I do funny stuff with
the class loader, the runtime version will override the Metro version.
Is the problem in the Metro distribution or in my mind? I'm continuing
to use Metro 1.5 for now because of this.

--
Eli Bishop
Wavemarket, Inc.
eli@wavemarket.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ramapulavarthi
Offline
Joined: 2004-06-01
Points: 0

As you can see, messageName is added in JAX-WS 2.2 API. Seems like, the API is loaded from JDK 6 which has JAX-WS 2.1 API. You might have to use endorsed mechanism to use Metro 2.0 on JDK 6. See https://metro.dev.java.net/guide/Using_JAX_WS_2_x___Metro_1_x_2_0_with_J... on this topic.