You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Laxmi Deepika Vadapalli (JIRA)" <ji...@apache.org> on 2009/10/28 15:20:59 UTC

[jira] Created: (CXF-2506) LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)

LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)
-----------------------------------------------------------------------------------------------------------

                 Key: CXF-2506
                 URL: https://issues.apache.org/jira/browse/CXF-2506
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.1.5
         Environment: Windows
            Reporter: Laxmi Deepika Vadapalli


I have my own SELoggingInterceptor. But it is same as LoggingInInterceptor code with no difference.

I see that when message is larger than 64kb i.e. when CachedOutputStream write to temp file, this interceptor is called twice.
First time, I process the message and second time I get Stream is closed Exception when I try to copy Message,content (InputStream) to CachedOutputStream.

I tried printing the interceptor chain and I see my interceptor only once.
It happens only with larger messages with CXF 2.1.5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2506) LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770951#action_12770951 ] 

Daniel Kulp commented on CXF-2506:
----------------------------------


Can you try with 2.1.7, this may already be fixed as the callbacks for the CachedOutputStream stuff was adjusted quite a bit.  Also, the LoggingInInterceptor itself has undergone a bunch of changes since 2.1.5.


> LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2506
>                 URL: https://issues.apache.org/jira/browse/CXF-2506
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: Windows
>            Reporter: Laxmi Deepika Vadapalli
>
> I have my own SELoggingInterceptor. But it is same as LoggingInInterceptor code with no difference.
> I see that when message is larger than 64kb i.e. when CachedOutputStream write to temp file, this interceptor is called twice.
> First time, I process the message and second time I get Stream is closed Exception when I try to copy Message,content (InputStream) to CachedOutputStream.
> I tried printing the interceptor chain and I see my interceptor only once.
> It happens only with larger messages with CXF 2.1.5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2506) LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)

Posted by "Laxmi Deepika Vadapalli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771417#action_12771417 ] 

Laxmi Deepika Vadapalli commented on CXF-2506:
----------------------------------------------

I tried with my production version CXF 2.0.4 and it works fine.

I want to upgrade to CXF 2.1.7 , latest version to avoid other problems since CXF 2.0.4 is very old version.

Please let me know if I can resolv ethis issue with CXF latest version.

THis time, my interceptor code is called only once but after proceesing it fails with Null pointer Exception in CXF code.
Here is the error.

java.lang.NullPointerException
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
HTTPConduit.java:1935) 
at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(
CacheAndWriteOutputStream.java:47) 
at org.apache.cxf.io.CachedOutputStream.close(
CachedOutputStream.java:188) 
at org.apache.cxf.transport.AbstractConduit.close(
AbstractConduit.java:66) 
at org.apache.cxf.transport.http.HTTPConduit.close(
HTTPConduit.java:627
) 
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(
MessageSenderInterceptor.java:62) 
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
PhaseInterceptorChain.java:236) 
at org.apache.cxf.endpoint.ClientImpl.invoke(
ClientImpl.java:478) 
at org.apache.cxf.endpoint.ClientImpl.invoke(
ClientImpl.java:308) 
at org.apache.cxf.endpoint.ClientImpl.invoke(
ClientImpl.java:260) 
at org.apache.cxf.frontend.ClientProxy.invokeSync(
ClientProxy.java:73) 
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
JaxWsClientProxy.java:127)

> LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2506
>                 URL: https://issues.apache.org/jira/browse/CXF-2506
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: Windows
>            Reporter: Laxmi Deepika Vadapalli
>         Attachments: java_first_jaxws.tar.gz
>
>
> I have my own SELoggingInterceptor. But it is same as LoggingInInterceptor code with no difference.
> I see that when message is larger than 64kb i.e. when CachedOutputStream write to temp file, this interceptor is called twice.
> First time, I process the message and second time I get Stream is closed Exception when I try to copy Message,content (InputStream) to CachedOutputStream.
> I tried printing the interceptor chain and I see my interceptor only once.
> It happens only with larger messages with CXF 2.1.5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-2506) LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-2506:
-----------------------------

    Attachment: java_first_jaxws.tar.gz


I cannot reproduce this with 2.1.5 or any other version.

I've attached a modified version of the java_first_jaxws demo that adds the logging interceptors on the server side and creates a 75K string on the client side and echos it.    The message is logged once on the server on the way in and once on the way out.

Thus, at this point, this bug is non-reproducible.   I'll need a full testcase.

> LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2506
>                 URL: https://issues.apache.org/jira/browse/CXF-2506
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: Windows
>            Reporter: Laxmi Deepika Vadapalli
>         Attachments: java_first_jaxws.tar.gz
>
>
> I have my own SELoggingInterceptor. But it is same as LoggingInInterceptor code with no difference.
> I see that when message is larger than 64kb i.e. when CachedOutputStream write to temp file, this interceptor is called twice.
> First time, I process the message and second time I get Stream is closed Exception when I try to copy Message,content (InputStream) to CachedOutputStream.
> I tried printing the interceptor chain and I see my interceptor only once.
> It happens only with larger messages with CXF 2.1.5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2506) LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)

Posted by "Laxmi Deepika Vadapalli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771062#action_12771062 ] 

Laxmi Deepika Vadapalli commented on CXF-2506:
----------------------------------------------

Daniel,

I tried with CXF version 2.1.7 also.
It did not solve my problem. But this time its not coming into my interceptor code twice.
But after processing my interceptor and all other CXF interceptors, I see Null Pointer Exception.
Pleas let me know how can I provide full test case to you.
Heres the stack trace:
WARNING: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1935)
	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:478)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:308)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:260)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:127)
	at $Proxy129.book(Unknown Source)
	at com.wdw.se.reservation.service.SEShowDiningService.book(SEShowDiningService.java:118)
	at com.wdw.se.reservation.controller.ReservationController.bookReservation(ReservationController.java:905)
	at com.wdw.se.utility.BookUtility.book(BookUtility.java:658)
	at com.wdw.se.shop.viewobject.ShoppingCart.book(ShoppingCart.java:669)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
	at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
	at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
	at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
	at javax.faces.component.UICommand.broadcast(UICommand.java:383)
	at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
	at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:316)
	at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:291)
	at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:248)
	at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:461)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.disney.corp.keystone.web.filter.LoginFilter.doFilter(Unknown Source)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.disney.corp.keystone.web.filter.SiteMinderLoginFilter.doFilter(Unknown Source)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
	at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
	at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Unknown Source)

> LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2506
>                 URL: https://issues.apache.org/jira/browse/CXF-2506
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: Windows
>            Reporter: Laxmi Deepika Vadapalli
>         Attachments: java_first_jaxws.tar.gz
>
>
> I have my own SELoggingInterceptor. But it is same as LoggingInInterceptor code with no difference.
> I see that when message is larger than 64kb i.e. when CachedOutputStream write to temp file, this interceptor is called twice.
> First time, I process the message and second time I get Stream is closed Exception when I try to copy Message,content (InputStream) to CachedOutputStream.
> I tried printing the interceptor chain and I see my interceptor only once.
> It happens only with larger messages with CXF 2.1.5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (CXF-2506) LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)

Posted by "Laxmi Deepika Vadapalli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Laxmi Deepika Vadapalli closed CXF-2506.
----------------------------------------

    Resolution: Fixed

Our custom interceptor code was also updated accordingly with CXF Logging In Interceptor and it worked fine.

> LoggingInInterceptor called twice if message is larger than 64 kb (when CachedOutStream writes to tempfile)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2506
>                 URL: https://issues.apache.org/jira/browse/CXF-2506
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: Windows
>            Reporter: Laxmi Deepika Vadapalli
>         Attachments: java_first_jaxws.tar.gz
>
>
> I have my own SELoggingInterceptor. But it is same as LoggingInInterceptor code with no difference.
> I see that when message is larger than 64kb i.e. when CachedOutputStream write to temp file, this interceptor is called twice.
> First time, I process the message and second time I get Stream is closed Exception when I try to copy Message,content (InputStream) to CachedOutputStream.
> I tried printing the interceptor chain and I see my interceptor only once.
> It happens only with larger messages with CXF 2.1.5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.