webService 找不到com/sun/tools/internal/xjc/api/XJC类。。
使用的是springboot jdk8,直接在idea中跑main是没问题的,但是打包成jar包,跑jar包就有问题。。
试了很多网上的办法 都无法解决这个问题。。。。
Caused by: javax.xml.bind.JAXBException
- with linked exception:
[java.lang.ClassNotFoundException: com/sun/tools/internal/xjc/api/XJC]
at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompiler(JAXBUtils.java:722)
at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompilerWithDefaultAllocator(JAXBUtils.java:729)
... 62 more
Caused by: java.lang.ClassNotFoundException: com/sun/tools/internal/xjc/api/XJC
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompiler(JAXBUtils.java:715)
加了
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.12</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
就会报jdk instance of jre
有没有哪位大哥碰到过相同问题的