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");
	}
	
}

springboot项目异常之java.lang.RuntimeException: Cannot create a secure XMLInputFactory_第1张图片

你可能感兴趣的:(spring-boot)