cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Maslov <therealma...@gmail.com>
Subject NPE in getMessageId() while receiving soap fault response
Date Thu, 24 Dec 2015 07:24:14 GMT
Hi!
I call external service via CXF client and I want to log outgoing and
incoming messages.
Requests logs successfully, but I could not log response if response
contains SoapFault. I get NPE instead.
Could you help me to log the response?

Exception and response are listed below.

java.lang.NullPointerException: null
        at
org.apache.cxf.ext.logging.event.DefaultLogEventMapper.getMessageId(DefaultLogEventMapper.java:194)
~[cxf-rt-features-logging-3.1.4.jar:3.1.4]
        at
org.apache.cxf.ext.logging.event.DefaultLogEventMapper.map(DefaultLogEventMapper.java:61)
~[cxf-rt-features-logging-3.1.4.jar:3.1.4]
        at
org.apache.cxf.ext.logging.LoggingInInterceptor.handleMessage(LoggingInInterceptor.java:46)
~[cxf-rt-features-logging-3.1.4.jar:3.1.4]
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
[cxf-core-3.1.4.jar:3.1.4]
        at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112)
[cxf-core-3.1.4.jar:3.1.4]
        at
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
[cxf-rt-bindings-soap-3.1.4.jar:3.1.4]
        at
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
[cxf-rt-bindings-soap-3.1.4.jar:3.1.4]
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
[cxf-core-3.1.4.jar:3.1.4]
        at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)
[cxf-core-3.1.4.jar:3.1.4]
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1669)
[cxf-rt-transports-http-3.1.4.jar:3.1.4]
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1550)
[cxf-rt-transports-http-3.1.4.jar:3.1.4]
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1347)
[cxf-rt-transports-http-3.1.4.jar:3.1.4]
        at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56)
[cxf-core-3.1.4.jar:3.1.4]
        at
org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:215)
[cxf-core-3.1.4.jar:3.1.4]
        at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
[cxf-core-3.1.4.jar:3.1.4]
        at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
[cxf-rt-transports-http-3.1.4.jar:3.1.4]
        at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
[cxf-core-3.1.4.jar:3.1.4]
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
[cxf-core-3.1.4.jar:3.1.4]
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
[cxf-core-3.1.4.jar:3.1.4]
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
[cxf-core-3.1.4.jar:3.1.4]
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
[cxf-core-3.1.4.jar:3.1.4]
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
[cxf-core-3.1.4.jar:3.1.4]
        at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
[cxf-rt-frontend-simple-3.1.4.jar:3.1.4]
        at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
[cxf-rt-frontend-jaxws-3.1.4.jar:3.1.4]
        at com.sun.proxy.$Proxy142.getEvakInfo(Unknown Source) [na:na]
        at com.smaslov.service.Service.doLoad(LoadService.java:102)
[classes/:na]
        at com.smaslov.service.Service.loadRawData(LoadService.java:91)
[classes/:na]
        at com.smaslov.service.job.LoadingDataJob$1.run(LoadJob.java:53)
[classes/:na]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[na:1.7.0_55]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
[na:1.7.0_55]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
[na:1.7.0_55]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
[na:1.7.0_55]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_55]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_55]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_55]


The response message:


<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="
http://www.w3.org/2005/08/addressing"><s:Header><a:Action
s:mustUnderstand="1">
http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault</a:Action><a:RelatesTo>urn:uuid:6cc79b4c-d097-4270-a153-e40d008cfbc1</a:RelatesTo></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Receiver</s:Value><s:Subcode><s:Value
xmlns:a="
http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</s:Value></s:Subcode></s:Code><s:Reason><s:Text
xml:lang="ru-RU">ORA-01422: exact fetch returns more than requested number
of rows
ORA-06512: at "SCHEMA.TBL", line 115
ORA-06512: at line 1    at
Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode,
OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx,
Object src, String procedure, Boolean bCheck)&#xD;
   at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode,
OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx*
pOpoSqlValCtx, Object src, Boolean bCheck)&#xD;
   at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()&#xD;
   at prognoz.siv.api.EvakService.Evak.DoRequest(EvakRequest
request)</s:Text></s:Reason><s:Detail><ExceptionDetail xmlns="
http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="
http://www.w3.org/2001/XMLSchema-instance"><HelpLink
i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException
i:nil="true"/><Message>ORA-01422: exact fetch returns more than requested
number of rows
   at SyncInvokeServiceInfo(Object , Object[] , Object[] )&#xD;
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object
instance, Object[] inputs, Object[]&amp; outputs)&#xD;
   at
System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp;
rpc)&#xD;
   at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp;
rpc)&#xD;
   at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp;
rpc)&#xD;
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean
isOperationContextSet)</StackTrace><Type>System.Exception</Type></ExceptionDetail></s:Detail></s:Fault></s:Body></s:Envelope>



-- 
*Sergey Maslov*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message