springboot项目异常之java.lang.RuntimeException: Cannot create a secure XMLInputFactory

1.异常描述

2018-10-22 21:44:14 [com.guohualife.common.util.rpc.cxf.soap.ClientTraceInterceptor|]-[INFO] 访问远程WebService服务|服务地址=http://10.56.81.135:7001/quartz/api/quartzService?wsdl
2018-10-22 21:44:14 [org.apache.cxf.phase.PhaseInterceptorChain|]-[WARN] Interceptor for {http://service.quartz.util.common.guohualife.com/}QuartzServiceService#{http://service.quartz.util.common.guohualife.com/}initScheduler has thrown exception, unwinding now
java.lang.RuntimeException: Cannot create a secure XMLInputFactory
	at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:338)
	at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:278)
	at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1725)
	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:127)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:835)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1684)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1560)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1361)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:658)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:535)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:444)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:345)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:298)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
	at com.sun.proxy.$Proxy97.initScheduler(Unknown Source)
	at com.guohualife.common.util.quartz.servlet.BatchInitServlet.init(BatchInitServlet.java:65)
	at javax.servlet.GenericServlet.init(GenericServlet.java:241)
	at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
	at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
	at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
	at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
	at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
	at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1984)
	at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1958)
	at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1877)
	at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3173)
	at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1529)
	at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:488)
	at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
	at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
	at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
	at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
	at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
	at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
	at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
	at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
	at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
	at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:671)
	at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
	at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
	at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:59)
	at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
	at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
	at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:187)
	at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:379)
	at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
	at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
	at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
	at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
	at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
	at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
	at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
	at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
	at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)
	at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
2018-10-22 21:44:14 [com.guohualife.common.util.quartz.servlet.BatchInitServlet|]-[INFO] 批处理加载失败,请手动加载!
java.lang.RuntimeException: Cannot create a secure XMLInputFactory
2018-10-22 21:44:14 [com.guohualife.common.util.quartz.servlet.BatchInitServlet|]-[INFO] 批处理加载结束
<Oct 22, 2018 9:44:14 PM GMT+08:00> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.> 
<Oct 22, 2018 9:44:14 PM GMT+08:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN> 
<Oct 22, 2018 9:44:14 PM GMT+08:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING> 
<Oct 22, 2018 9:44:14 PM GMT+08:00> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7003 for protocols iiop, t3, ldap, snmp, http.> 
<Oct 22, 2018 9:44:14 PM GMT+08:00> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fe80:0:0:0:250:56ff:fea1:da:7003 for protocols iiop, t3, ldap, snmp, http.> 
<Oct 22, 2018 9:44:14 PM GMT+08:00> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on 0:0:0:0:0:0:0:1:7003 for protocols iiop, t3, ldap, snmp, http.> 
<Oct 22, 2018 9:44:14 PM GMT+08:00> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.56.81.179:7003 for protocols iiop, t3, ldap, snmp, http.> 
<Oct 22, 2018 9:44:14 PM GMT+08:00> <Notice> <WebLogicServer> <BEA-000330> <Started WebLogic Managed Server "server_7003" for domain "third_dat" running in Production Mode> 
<Oct 22, 2018 9:44:15 PM GMT+08:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING> 
<Oct 22, 2018 9:44:15 PM GMT+08:00> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode> 


2.解决方案

	@PostConstruct
	public void init()
	{ 
	System.setProperty(StaxUtils.ALLOW_INSECURE_PARSER,"1");
	}
	
}

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
根据提供的引用内容,你遇到了一个运行时异常:Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Cannot find implementation。这个异常通常是由于找不到某个类的实现导致的。解决这个问题的方法有以下几种: 1. 检查依赖项:首先,确保你的项目中包含了所需的依赖项。在Android开发中,你可以在项目的build.gradle文件中添加所需的依赖项。例如,如果你使用的是Gradle构建工具,你可以在dependencies部分添加所需的库。然后,重新构建你的项目并运行它。 2. 检查类路径:如果你确定依赖项已经正确添加到项目中,那么可能是类路径的问题。类路径是指Java虚拟机(JVM)用来查找类文件的路径。确保你的类路径包含了所需的类文件。你可以通过在命令行中使用java命令的-cp选项来指定类路径。例如,如果你的类文件位于一个名为lib的文件夹中,你可以使用以下命令来运行你的应用程序: ```shell java -cp lib/ YourMainClass ``` 3. 检查类名和包名:如果你确定依赖项和类路径都没有问题,那么可能是类名或包名的问题。确保你在代码中正确引用了类名和包名。检查你的import语句和类的全限定名是否正确。 4. 清除缓存和重新构建:有时候,清除构建缓存并重新构建项目可以解决一些奇怪的问题。你可以尝试清除你的项目的构建缓存,并重新构建它。 5. 检查编译版本:如果你在使用某个库或框架时遇到了这个问题,确保你的编译版本与该库或框架的要求相匹配。有时候,不同的库或框架需要特定的编译版本才能正常工作。 这些是解决Caused by: java.lang.ClassNotFoundException: Cannot find implementation异常的一些常见方法。根据你的具体情况,你可以尝试其中的一种或多种方法来解决问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

东山富哥

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值