cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David J. M. Karlsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6554) Exception thrown in LoggingInInterceptor
Date Mon, 11 Apr 2016 11:51:25 GMT

    [ https://issues.apache.org/jira/browse/CXF-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15234933#comment-15234933
] 

David J. M. Karlsen commented on CXF-6554:
------------------------------------------

We can surely increase the limit to avoid it.
But should failing logging really fail the entire request? [*]
I have some suggestions:
1. At least it should be documented that prettyLogging can make the application malfunction
2 (best option). when using pretty printing, force the limit to -1, and maybe log a warning
at startup There seems to be tension between the prettyPrint option and the default limit
set ootb.
3. (too complex/far-fetched) - implement the prettylogging option so that it would cut the
xml at an appropiate place and simply close elements not properly closed.

and maybe implement nevertheless: 
make logging robust, so that if it fails, simply log a warning with a stack trace, but handle
the exception so the ws service-operation does not fail.

[*]
{noformat}
n.SystemException: javax.xml.ws.soap.SOAPFaultException: [com.ctc.wstx.exc.WstxLazyException]
Unexpected EOF in entity reference
{noformat}

> Exception thrown in LoggingInInterceptor
> ----------------------------------------
>
>                 Key: CXF-6554
>                 URL: https://issues.apache.org/jira/browse/CXF-6554
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.7.17
>            Reporter: Damon Horrell
>            Priority: Minor
>
> An exception is thrown for some inbound messages when logging is enabled via:
> <bean class="org.apache.cxf.feature.LoggingFeature">
> 	<property name="prettyLogging" value="true" />
> </bean>
> Overriding the default 65536 character limit fixes the problem:
> <bean class="org.apache.cxf.feature.LoggingFeature">
> 	<property name="limit" value="-1" />
> 	<property name="prettyLogging" value="true" />
> </bean>
> -------------
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: [com.ctc.wstx.exc.WstxLazyException]
Unexpected end of input block in entity reference
>  at [row,col {unknown-source}]: [1017,49]
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:158)
> 	at $Proxy42.getDocumentById(Unknown Source)
> 	at nz.govt.moh.eps.proxy.PrescriptionServiceProxy.getDocumentById(PrescriptionServiceProxy.java:82)
> 	at nz.govt.moh.eps.client.EpsTestClient.main(EpsTestClient.java:45)
> Caused by: [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxEOFException: Unexpected
end of input block in entity reference
>  at [row,col {unknown-source}]: [1017,49]
> 	at com.ctc.wstx.exc.WstxLazyException.throwLazily(WstxLazyException.java:45)
> 	at com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java:728)
> 	at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3678)
> 	at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:860)
> 	at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:748)
> 	at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:697)
> 	at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:621)
> 	at org.apache.cxf.interceptor.AbstractLoggingInterceptor.writePayload(AbstractLoggingInterceptor.java:164)
> 	at org.apache.cxf.interceptor.LoggingInInterceptor.logInputStream(LoggingInInterceptor.java:215)
> 	at org.apache.cxf.interceptor.LoggingInInterceptor.logging(LoggingInInterceptor.java:153)
> 	at org.apache.cxf.interceptor.LoggingInInterceptor.handleMessage(LoggingInInterceptor.java:79)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:849)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1632)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1520)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1318)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:633)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
> 	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:136)
> 	... 3 more
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected end of input block in entity
reference
>  at [row,col {unknown-source}]: [1017,49]
> 	at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOB(StreamScanner.java:699)
> 	at com.ctc.wstx.sr.StreamScanner.loadMoreFromCurrent(StreamScanner.java:1071)
> 	at com.ctc.wstx.sr.StreamScanner.getNextCharFromCurrent(StreamScanner.java:810)
> 	at com.ctc.wstx.sr.StreamScanner.resolveCharEnt(StreamScanner.java:2325)
> 	at com.ctc.wstx.sr.StreamScanner.resolveCharOnlyEntity(StreamScanner.java:1347)
> 	at com.ctc.wstx.sr.BasicStreamReader.readTextSecondary(BasicStreamReader.java:4715)
> 	at com.ctc.wstx.sr.BasicStreamReader.finishToken(BasicStreamReader.java:3722)
> 	at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3676)
> 	... 28 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message