Using JAX-WS 2.1 with release E6 (NoClassDefFoundError: org/jvnet/staxex/XMLStreamReaderEx)

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.