java.lang.ClassNotFoundException: com/sun/tools/internal/xjc/api/XJC
发布日期:2021-06-30 16:23:21
浏览次数:3
分类:技术文章
本文共 3387 字,大约阅读时间需要 11 分钟。
对接某webservice项目时报错
java.lang.IllegalStateException: Unable to create schema compiler at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompilerWithDefaultAllocator(JAXBUtils.java:733) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createSchemaCompiler(DynamicClientFactory.java:446) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:326) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:244) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:237) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:192) at com.jiasx.study.webservice.service.DemoServiceTest.test(DemoServiceTest.java:15) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)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:718) at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompilerWithDefaultAllocator(JAXBUtils.java:725) ... 29 moreCaused by: java.lang.ClassNotFoundException: com/sun/tools/internal/xjc/api/XJC at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:398) at org.apache.cxf.common.jaxb.JAXBUtils.createSchemaCompiler(JAXBUtils.java:711) ... 30 more
错误位置为java.lang.ClassNotFoundException: com/sun/tools/internal/xjc/api/XJC
网上查到原因是因为 【配置jdk环境的时候默认用的是jre】
看了下maven项目确实,调整为本地jdk环境后正常
转载地址:https://kevin.blog.csdn.net/article/details/116402534 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
第一次来,支持一个
[***.219.124.196]2024年04月20日 07时22分41秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
windows2008 R2sp1安装loadrunner12
2019-05-01
LoadRunner12浏览器录制(谷歌火狐)
2019-05-01
LoadRunner12——录制脚本
2019-05-01
LoadRunner12——回放脚本
2019-05-01
python多线程_thread与threading(推荐使用)
2019-05-01
pip安装openpyxl失败,更换镜像源
2019-05-01
python 使用ddt数据驱动
2019-05-01
selenium之 如何控制网页内嵌div中滚动条的滚动
2019-05-01
【经验分享】XPATH逻辑运算
2019-05-01
python+selenium 浏览器无界面模式运行
2019-05-01
appium使用过程中的踩坑集
2019-05-01
appium的XPATH获取text值的方式与selenium区别
2019-05-01
处理appium获取toast内容
2019-05-01
解决uiautomatorviewer中添加xpath的方法
2019-05-01
Windows Server R2 安装python时报策略不允许的解决方案
2019-05-01
pip无法安装:换成国内镜像
2019-05-01
python安装mysqlclient[MySQLdb]
2019-05-01
性能测试的必要性评估以及评估方法
2019-05-01
性能测试需求分析
2019-05-01