2.8. Using JAX-WS 2.1 with login E6
FROM: https://jax-ws.dev.java.net/guide/Using_JAX_WS_2_1_with_JavaSE6.html
Ipve6 ships with JAX-WS 2.0 API inRt. jar, Which causes some trouble when you try to run applications that use JAX-WS 2.1 API. This document collects information about how to solve this issue. 2.8.1. Endorsed directory
One way to fix this is to copyJaxws-api.jarAndJaxb-api.jarInto JRE endorsed directory, which is$ JAVA_HOME/lib/endorsed(Or$ JDK_HOME/jre/lib/endorsed)
Some application containers, such as Glassfish, modifies the location of the endorsed directory to a different place. From inside the JVM, you can check the current location by doingSystem. out. println (System. getProperty ("java. endorsed. dirs "));
Obviusly you still need other JAX-WS jars in your classpath.
Please do not put all the jars to the endorsed directory. this makes it impossible for JAX-WS RI to see other classes that it needs for its operation, such as servlet classes on the server-side, or Ant classes in the tool time. as those are not loaded by the bootstrap classloader, you'll getNoClassDefErrorOn servlet/Ant classes.
As mentioned aboveJaxws-api.jarAndJaxb-api.jar placed inIn the jre \ lib \ endorsed directory, do not put too many things.
I put the jaxb-api.jar AND THE webservices-api-2.0.jar, it's okay, There is a webservices-rt.jar at the beginning, there will be NoClassDefFoundError.
NoClassDefFoundError: org/jvnet/staxex/XMLStreamReaderEx