1.异常描述
2018-11-13 13:50:30 [com.guohualife.ebiz.third.action.impl.AssetsAction|]-[INFO] 调用BPM资产文件开始,请求入参:
<com.guohualife.ebiz.bpm.asset.dto.request.AssetDetailQueryReqDTO>
<systemType>THIRDPART</systemType>
<incomeDate>2018-10-26 00:00:00.0 CST</incomeDate>
<orderType>31</orderType>
<isNeedZeroIncome>false</isNeedZeroIncome>
<pageQueryDTO>
<doCount>true</doCount>
<queryAll>false</queryAll>
<startPosition>1</startPosition>
<pageSize>500</pageSize>
<currentPage>1</currentPage>
<maxQueryId class="long">0</maxQueryId>
</pageQueryDTO>
</com.guohualife.ebiz.bpm.asset.dto.request.AssetDetailQueryReqDTO>
2018-11-13 13:50:32 [com.guohualife.common.util.rpc.cxf.soap.ClientTraceInterceptor|]-[INFO] 访问远程WebService服务|服务地址=http://10.56.81.132:7001/bpm/api/assetService?wsdl
2018-11-13 13:50:32 [org.apache.cxf.phase.PhaseInterceptorChain|]-[WARN] Interceptor for {http://service.asset.bpm.ebiz.guohualife.com/}AssetServiceService#{http://service.asset.bpm.ebiz.guohualife.com/}getAssetDailyIncome 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.$Proxy107.getAssetDailyIncome(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:84)
at com.guohualife.common.util.rpc.cxf.TraceAdvice.clientInvoke(TraceAdvice.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy108.getAssetDailyIncome(Unknown Source)
at com.guohualife.ebiz.third.action.impl.AssetsAction.getBpmAssets(AssetsAction.java:272)
at com.guohualife.ebiz.third.action.impl.AssetsAction.initAssetsAndGetProduct(AssetsAction.java:207)
at com.guohualife.ebiz.third.action.impl.AssetsAction.doAction(AssetsAction.java:77)
at com.guohualife.ebiz.third.action.BaseAction.doAction(BaseAction.java:146)
at com.guohualife.ebiz.third.transaction.ThirdTransaction.doTransaction(ThirdTransaction.java:55)
at com.guohualife.ebiz.third.trade.ThirdUploadFileTrade.deal(ThirdUploadFileTrade.java:137)
at com.guohualife.gateway.common.trade.UploadFileTrade.doTrade(UploadFileTrade.java:16)
at com.guohualife.gateway.common.bo.impl.TradeBoImpl.doTrade(TradeBoImpl.java:41)
at com.guohualife.ebiz.third.batch.impl.FileTradeBatchImpl.executeBatch(FileTradeBatchImpl.java:181)
at com.guohualife.ebiz.third.batch.impl.FileTradeBatchImplTest.test(FileTradeBatchImplTest.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
2.解决方案
pom中未添加cxf-rt-ws-security包
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>2.2.9</version>
</dependency>
``