我正在使用Oracle Java 7 Update 3在Ubuntu上运行测试.根据发行说明,它附带了JAXB-2.2.4.
/home/ubuntu# update-alternatives --config java
There is only one alternative in link group java: /usr/lib/jvm/java-7-oracle/bin/java
Nothing to configure.
Run Code Online (Sandbox Code Playgroud)
机器上说它上面有JAXB-2.2.4:
$ wsimport -version
JAX-WS RI 2.2.4-b01
Run Code Online (Sandbox Code Playgroud)
$ java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode)
Run Code Online (Sandbox Code Playgroud)
但是,当我运行使用JAX-RS的应用程序并使用JAXB编组一些对象时,我收到以下错误:
Apr 05, 2012 10:45:50 AM com.sun.jersey.api.json.JSONConfiguration natural
SEVERE: NATURAL JSON notation configured, but JAXB RI 2.1.10 not found. For the
recent builds to get this working correctly, you need even …
Run Code Online (Sandbox Code Playgroud)