zoukankan      html  css  js  c++  java
  • Using JAXWS 2.1 with JavaSE6 (NoClassDefFoundError: org/jvnet/staxex/XMLStreamReaderEx)

    2.8. Using JAX-WS 2.1 with JavaSE6

    FROM:https://jax-ws.dev.java.net/guide/Using_JAX_WS_2_1_with_JavaSE6.html

    JavaSE6 ships with JAX-WS 2.0 API in rt.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 copy jaxws-api.jar and jaxb-api.jar into 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 doing System.out.println(System.getProperty("java.endorsed.dirs"));

    Obviously 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 get NoClassDefError on servlet/Ant classes.

    上面说在把jaxws-api.jar and jaxb-api.jar放到jre\lib\endorsed目录下就行,不要放太多东西。

    我是放了jaxb-api.jar和webservices-api-2.0.jar,就可以了,一开始还有webservices-rt.jar,会有NoClassDefFoundError错误。

    NoClassDefFoundError: org/jvnet/staxex/XMLStreamReaderEx

  • 相关阅读:
    编译KlayGE所需要的第三方库和工具下载
    KlayGE启用顶级域名
    Sophus和Eigen 李群李代数 简单介绍
    G2O曲线拟合1
    梯度下降
    PCL1.8单张图点云转换显示
    双目测距demo
    Kinect基于微软SDK彩图与深度图对齐
    单例模式
    zendstudio卡死
  • 原文地址:https://www.cnblogs.com/huqingyu/p/1693479.html
Copyright © 2011-2022 走看看