You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Voß, Marko <Ma...@fiz-Karlsruhe.de> on 2012/08/09 13:04:04 UTC

AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Hello,

After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.

Do you have any idea what could be wrong here? Obviously the code:

Bus.getExtension(ContinuationProviderFactory.class) returns null

What got changed here?


Thank you and best regards,
Marko


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



RE: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Voß, Marko <Ma...@fiz-Karlsruhe.de>.
Hello Sergey,

Just for clarification:

The client is performing a HTTP PUT request and we get a NullPointerException in our service because the InputStream of the HTTP body is null.

CXF 2.6.1: AbstractHTTPDestination line 376-380:

if (!isServlet3) {
  if (cproviderFactory != null) {
    return cproviderFactory.retrieveFromContinuation(req);
  }
  return null;  // <-- this is what we get
}

Maybe this helps.


Best regards,
Marko


-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Thursday, August 09, 2012 9:48 PM
To: users@cxf.apache.org
Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Hi Marko
On 09/08/12 14:04, Voß, Marko wrote:
> Hello,
>
> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>
> Do you have any idea what could be wrong here? Obviously the code:
>
> Bus.getExtension(ContinuationProviderFactory.class) returns null
>
> What got changed here?
>
Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?

I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat & Jetty and see if you can reproduce the issue ?

Thanks, Sergey
>
> Thank you and best regards,
> Marko
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 22/08/12 17:43, Voß, Marko wrote:
> Hello Sergey,
>
>> I'd phrase it differently :-), if one prefers to read directly from the input stream then CXF features which filter the incoming payload based on its content can not be applied.
>
> Can't the DepthRestrictingStreamInterceptor differ between requests, which deal with XML and requests, which deal with any content? So it could do nothing, if it is no XML content. That is, what I expected, when I read about this interceptor.
> In our scenario we have many services with many endpoints. All are put into one<jaxrs:server>  bean. Now, I have to disable this security interceptor for everything. :/
>
Yes, I've updated the interceptor to ignore all non-XML payloads, when 
possible (will merge to the branches a bit later on). Also, if you mean 
that you have many root resource handlers grouped within a single 
endpoint, then the other option is to introduce a dedicated jaxrs;server 
per every such resource and then share the interceptor only between 
endpoints that expect XML...

>> Note that CXF multipart handlers will manage the over-flow to the disk if needed.
>
> Another feature of this Stream class is the maven-xjc-plugin addon I wrote for the class generation of the JAXB classes. JAXB will create DOM for any content. With this DomHandler addon, the classes do now use the Stream class instead and therefore gigabytes of any content can be handled and will NOT put into DOM in memory. Does CXF also handle this? :)
>
Sounds pretty cool :-) As far as CXF is concerned, I guess it can do a 
lot with JAXB, Dan did a lot of enhancements there..., not sure about 
the plugin addon though

Thanks, Sergey
>
> Best,
> Marko
>
>
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> Sent: Wednesday, August 22, 2012 6:18 PM
> To: users@cxf.apache.org
> Cc: Voß, Marko
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1
>
> Hi
> On 22/08/12 16:43, Voß, Marko wrote:
>> Hello Sergey,
>>
>> We are using a self-written Stream class, which extends from OutputSream and offers a getInputStream-method.
>>
>> The purpose of this class is to write data to this stream, which will keep the data in memory as long as the threshold is not exceeded. Once the threshold is exceeded, the data will be written to a temporary file. Once the data is written and the stream gets closed, you can get as many InputStream instances on the data as you like.
>> The idea behind this was, to be able to deal better with very large data in different kinds of circumstances.
>>
>> We are using a MessageBodyReader and -Writer to enable the usage of this class in the JAX-RS interface method signatures.
>>
>> The endpoint looks like this:
>>
>> @PUT
>> @Produces(MediaType.TEXT_XML)
>> ResultTO create(Stream stream);
>>
>> To sum this up:
>>
>> As long as we are using InputStream or our Stream class in the signatures, we cannot enable the DepthRestrictingStreamInterceptor.
>>
>> Are you going to fix this or do you leave this behavior as it is?
>>
>>> I'm not sure I can use DelegatingInputStream if InputStream is 'null'
>> because that will bypass what this interceptor or other similar interceptors trying to do.
>>
>> Yep, using the DelegatingInputStream instead is no good idea then.
>>
>
> I'd phrase it differently :-), if one prefers to read directly from the input stream then CXF features which filter the incoming payload based on its content can not be applied. Only the logging feature or any other feature that does some opaque processing will work, but features like the depth restriction or transformation ones, that expect a structured
> (XML) payload can not be applied.
>
> Note that CXF multipart handlers will manage the over-flow to the disk if needed. If it is XML (but without multiparts) and the effective processing is needed then I guess the option to try is to use Source, by default it will be CXF Stax source - the difference is that it will be able to work with XML stream readers that may be available.
>
> Or, if possible, consider updating your Stream class to handle XMLStreamReader instance available on the message
>
> Cheers, Sergey
>
>> Best,
>> Marko
>>
>>
>> -----Original Message-----
>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>> Sent: Wednesday, August 22, 2012 5:08 PM
>> To: users@cxf.apache.org
>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>> update to CXF 2.6.1
>>
>> Hi Marko
>>
>>
>> Thanks for the analysis,
>>
>> On 22/08/12 15:53, Voß, Marko wrote:
>>> Hello again,
>>>
>>> I was able to figure out the cause of the problem.
>>>
>>> I introduced the
>>> org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor some time ago. When disabling this feature, everything works.
>>>
>>> <bean id="depthInterceptor" class="org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor">
>>>       <!-- Total number of elements in the XML payload -->
>>>       <property name="elementCountThreshold" value="10000"/>
>>>       <!-- Total number of child elements in the XML payload -->
>>>       <property name="innerElementCountThreshold" value="6000"/>
>>>       <!-- Maximum stack depth of the XML payload -->
>>>       <property name="innerElementLevelThreshold" value="40"/>
>>> </bean>
>>>
>>> <jaxrs:server id="RestServices" address="" staticSubresourceResolution="true">
>>>       ...
>>>       <jaxrs:inInterceptors>
>>>         <ref bean="depthInterceptor"/>
>>>       </jaxrs:inInterceptors>
>>> </jaxrs:server>
>>>
>>>
>>> I saw, that the AbstractHTTPDestination is creating a new Message
>>> instance, registering the InputStream of the request with the following keys:
>>>
>>> - DelegatingInputStream.class
>>> - InputStream.class
>>>
>>> The cause of the error is at: org.apache.cxf.jaxrs.utils.JAXRSUtils#processParameter line 599:
>>>
>>> InputStream is = message.getContent(InputStream.class);
>>>
>>> This returns null. When debugging, I tested
>>> message.getContent(DelegatingInputStream.class) and it worked, returning the expected result.
>>>
>>>
>>> I believe, that there is a bug in the logic of:
>>>
>>> org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor
>>> #
>>> handleMessage
>>>
>>> because the code is setting the InputStream.class entry value to null
>>> at line 77 and maybe some future logic is not fixing this.
>>>
>>>
>>> The service, which does not work, is responsible for uploading any
>>> kind of data. The service endpoint method is PUT as noted before I think. Can I even use the DepthInterceptor, if a service is dealing with - maybe large - binary data?
>>>
>> Do you have 'InputStream' input parameter in the resource method ?
>>
>> I'm asking because I have a couple of tests (POST is used, but same would work with PUT) where this interceptor is also used and all works OK, the message is deserialized.
>>
>> However if it is InputStream that is expected than it won't work indeed.
>> I'm not sure I can use DelegatingInputStream if InputStream is 'null'
>> because that will bypass what this interceptor or other similar interceptors trying to do.
>>
>> Assuming it is InputStream that you have in the resource method
>> signature, can you replace it with JAXP Source instead ? That will
>> work with this interceptor
>>
>> Cheers, Sergey
>>
>>
>>>
>>> best regards,
>>> Marko
>>>
>>>
>>> Am 22.08.2012 11:36, schrieb Voß, Marko:
>>>> Hello Dan,
>>>>
>>>> I understand. So you are saying, the application should not even enter this method. Maybe this helps me, to figure out the problem on my own.
>>>>
>>>>
>>>> Thanks so far and regards,
>>>> Marko
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>>> Sent: Tuesday, August 21, 2012 7:09 PM
>>>> To: users@cxf.apache.org
>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>>> update to CXF 2.6.1
>>>>
>>>>
>>>> On Aug 21, 2012, at 9:28 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>    wrote:
>>>>
>>>>> Hello Sergey, hello Dan,
>>>>>
>>>>> I tried to create a simple project in order to reproduce the error but I failed so far. The origin project is a bit too complex to simply create a little copy of it. I am working on it.
>>>>>
>>>>> Question:
>>>>>
>>>>> Bus.getExtension(ContinuationProviderFactory.class) has to return null for Tomcat 6, understood.
>>>>>
>>>>> So this code should be wrong then, or?
>>>>>
>>>>> AbstractHttpDestination:376-382
>>>>>
>>>>> if (!isServlet3) {
>>>>>       if (cproviderFactory != null) {
>>>>>          return cproviderFactory.retrieveFromContinuation(req);
>>>>>       }
>>>>>       return null;
>>>>> }
>>>>> return retrieveFromServlet3Async(req);
>>>>>
>>>>> ---
>>>>>
>>>>> Ok, Tomcat 6, no continuation:
>>>>>
>>>>> !isServlet3 is true AND we do not have a cproviderFactory... so it will return null. Is this really true to return null here?
>>>>
>>>> I would assume so.  If it's not servlet3  (!isServlet3), we cannot use the servlet 3 stuff.  Without a ContinuationProviderFactory (only provided by Jetty 7.x) there is really nothing we can do from a continuation standpoint.  Continuations would not be supported at all.
>>>>
>>>> Dan
>>>>
>>>>
>>>>>
>>>>>
>>>>> Best,
>>>>> Marko
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>>> Sent: Wednesday, August 15, 2012 11:29 AM
>>>>> To: users@cxf.apache.org
>>>>> Cc: Voß, Marko
>>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>>>> update to CXF 2.6.1
>>>>>
>>>>> Hi
>>>>> On 15/08/12 10:29, Voß, Marko wrote:
>>>>>> Hello Daniel,
>>>>>>
>>>>>> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>>>>>>
>>>>>> I could not yet figure out, why
>>>>>>
>>>>>> if (!isServlet3)
>>>>>>
>>>>>> is true for this one service only...
>>>>>>
>>>>> Can you please create a war or Maven-based test case that can help us reproduce the issue ?
>>>>>
>>>>> Cheers, Sergey
>>>>>
>>>>>>
>>>>>> best regards,
>>>>>> Marko
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>>>>> Sent: Monday, August 13, 2012 6:34 PM
>>>>>> To: users@cxf.apache.org
>>>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null
>>>>>> after update to CXF 2.6.1
>>>>>>
>>>>>>
>>>>>> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>     wrote:
>>>>>>
>>>>>>> Hello again,
>>>>>>>
>>>>>>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>>>>>>
>>>>>>> What do I have to change to get this working with Tomcat 6?
>>>>>>
>>>>>> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>>>>>>
>>>>>>> Maybe we have to upgrade the container to Tomcat 7.
>>>>>>
>>>>>> This is definitely what I would suggest.
>>>>>>
>>>>>> Dan
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Marko
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>>>>> Sent: Thursday, August 09, 2012 9:48 PM
>>>>>>> To: users@cxf.apache.org
>>>>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null
>>>>>>> after update to CXF 2.6.1
>>>>>>>
>>>>>>> Hi Marko
>>>>>>> On 09/08/12 14:04, Voß, Marko wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>>>>>>
>>>>>>>> Do you have any idea what could be wrong here? Obviously the code:
>>>>>>>>
>>>>>>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>>>>>>
>>>>>>>> What got changed here?
>>>>>>>>
>>>>>>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>>>>>>
>>>>>>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&     Jetty and see if you can reproduce the issue ?
>>>>>>>
>>>>>>> Thanks, Sergey
>>>>>>>>
>>>>>>>> Thank you and best regards,
>>>>>>>> Marko
>>>>>>>>
>>>>>>>>
>>>>>>>> -------------------------------------------------------
>>>>>>>>
>>>>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sergey Beryozkin
>>>>>>>
>>>>>>> Talend Community Coders
>>>>>>> http://coders.talend.com/
>>>>>>>
>>>>>>> Blog: http://sberyozkin.blogspot.com
>>>>>>>
>>>>>>>
>>>>>>> -------------------------------------------------------
>>>>>>>
>>>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Daniel Kulp
>>>>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder
>>>>>> - http://coders.talend.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> -------------------------------------------------------
>>>>>>
>>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> -------------------------------------------------------
>>>>>
>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>
>>>>>
>>>>
>>>> --
>>>> Daniel Kulp
>>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder -
>>>> http://coders.talend.com
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------
>>>>
>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>> Blog: http://sberyozkin.blogspot.com
>>
>>
>> -------------------------------------------------------
>>
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>
>>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>


RE: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Voß, Marko <Ma...@fiz-Karlsruhe.de>.
Hello Sergey,

> I'd phrase it differently :-), if one prefers to read directly from the input stream then CXF features which filter the incoming payload based on its content can not be applied.

Can't the DepthRestrictingStreamInterceptor differ between requests, which deal with XML and requests, which deal with any content? So it could do nothing, if it is no XML content. That is, what I expected, when I read about this interceptor.
In our scenario we have many services with many endpoints. All are put into one <jaxrs:server> bean. Now, I have to disable this security interceptor for everything. :/
 
> Note that CXF multipart handlers will manage the over-flow to the disk if needed.

Another feature of this Stream class is the maven-xjc-plugin addon I wrote for the class generation of the JAXB classes. JAXB will create DOM for any content. With this DomHandler addon, the classes do now use the Stream class instead and therefore gigabytes of any content can be handled and will NOT put into DOM in memory. Does CXF also handle this? :)


Best,
Marko


-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Wednesday, August 22, 2012 6:18 PM
To: users@cxf.apache.org
Cc: Voß, Marko
Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Hi
On 22/08/12 16:43, Voß, Marko wrote:
> Hello Sergey,
>
> We are using a self-written Stream class, which extends from OutputSream and offers a getInputStream-method.
>
> The purpose of this class is to write data to this stream, which will keep the data in memory as long as the threshold is not exceeded. Once the threshold is exceeded, the data will be written to a temporary file. Once the data is written and the stream gets closed, you can get as many InputStream instances on the data as you like.
> The idea behind this was, to be able to deal better with very large data in different kinds of circumstances.
>
> We are using a MessageBodyReader and -Writer to enable the usage of this class in the JAX-RS interface method signatures.
>
> The endpoint looks like this:
>
> @PUT
> @Produces(MediaType.TEXT_XML)
> ResultTO create(Stream stream);
>
> To sum this up:
>
> As long as we are using InputStream or our Stream class in the signatures, we cannot enable the DepthRestrictingStreamInterceptor.
>
> Are you going to fix this or do you leave this behavior as it is?
>
>> I'm not sure I can use DelegatingInputStream if InputStream is 'null'
> because that will bypass what this interceptor or other similar interceptors trying to do.
>
> Yep, using the DelegatingInputStream instead is no good idea then.
>

I'd phrase it differently :-), if one prefers to read directly from the input stream then CXF features which filter the incoming payload based on its content can not be applied. Only the logging feature or any other feature that does some opaque processing will work, but features like the depth restriction or transformation ones, that expect a structured
(XML) payload can not be applied.

Note that CXF multipart handlers will manage the over-flow to the disk if needed. If it is XML (but without multiparts) and the effective processing is needed then I guess the option to try is to use Source, by default it will be CXF Stax source - the difference is that it will be able to work with XML stream readers that may be available.

Or, if possible, consider updating your Stream class to handle XMLStreamReader instance available on the message

Cheers, Sergey

> Best,
> Marko
>
>
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> Sent: Wednesday, August 22, 2012 5:08 PM
> To: users@cxf.apache.org
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
> update to CXF 2.6.1
>
> Hi Marko
>
>
> Thanks for the analysis,
>
> On 22/08/12 15:53, Voß, Marko wrote:
>> Hello again,
>>
>> I was able to figure out the cause of the problem.
>>
>> I introduced the
>> org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor some time ago. When disabling this feature, everything works.
>>
>> <bean id="depthInterceptor" class="org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor">
>>      <!-- Total number of elements in the XML payload -->
>>      <property name="elementCountThreshold" value="10000"/>
>>      <!-- Total number of child elements in the XML payload -->
>>      <property name="innerElementCountThreshold" value="6000"/>
>>      <!-- Maximum stack depth of the XML payload -->
>>      <property name="innerElementLevelThreshold" value="40"/>  
>> </bean>
>>
>> <jaxrs:server id="RestServices" address="" staticSubresourceResolution="true">
>>      ...
>>      <jaxrs:inInterceptors>
>>        <ref bean="depthInterceptor"/>
>>      </jaxrs:inInterceptors>
>> </jaxrs:server>
>>
>>
>> I saw, that the AbstractHTTPDestination is creating a new Message 
>> instance, registering the InputStream of the request with the following keys:
>>
>> - DelegatingInputStream.class
>> - InputStream.class
>>
>> The cause of the error is at: org.apache.cxf.jaxrs.utils.JAXRSUtils#processParameter line 599:
>>
>> InputStream is = message.getContent(InputStream.class);
>>
>> This returns null. When debugging, I tested
>> message.getContent(DelegatingInputStream.class) and it worked, returning the expected result.
>>
>>
>> I believe, that there is a bug in the logic of:
>>
>> org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor
>> #
>> handleMessage
>>
>> because the code is setting the InputStream.class entry value to null 
>> at line 77 and maybe some future logic is not fixing this.
>>
>>
>> The service, which does not work, is responsible for uploading any 
>> kind of data. The service endpoint method is PUT as noted before I think. Can I even use the DepthInterceptor, if a service is dealing with - maybe large - binary data?
>>
> Do you have 'InputStream' input parameter in the resource method ?
>
> I'm asking because I have a couple of tests (POST is used, but same would work with PUT) where this interceptor is also used and all works OK, the message is deserialized.
>
> However if it is InputStream that is expected than it won't work indeed.
> I'm not sure I can use DelegatingInputStream if InputStream is 'null'
> because that will bypass what this interceptor or other similar interceptors trying to do.
>
> Assuming it is InputStream that you have in the resource method 
> signature, can you replace it with JAXP Source instead ? That will 
> work with this interceptor
>
> Cheers, Sergey
>
>
>>
>> best regards,
>> Marko
>>
>>
>> Am 22.08.2012 11:36, schrieb Voß, Marko:
>>> Hello Dan,
>>>
>>> I understand. So you are saying, the application should not even enter this method. Maybe this helps me, to figure out the problem on my own.
>>>
>>>
>>> Thanks so far and regards,
>>> Marko
>>>
>>>
>>> -----Original Message-----
>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>> Sent: Tuesday, August 21, 2012 7:09 PM
>>> To: users@cxf.apache.org
>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>>> update to CXF 2.6.1
>>>
>>>
>>> On Aug 21, 2012, at 9:28 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>   wrote:
>>>
>>>> Hello Sergey, hello Dan,
>>>>
>>>> I tried to create a simple project in order to reproduce the error but I failed so far. The origin project is a bit too complex to simply create a little copy of it. I am working on it.
>>>>
>>>> Question:
>>>>
>>>> Bus.getExtension(ContinuationProviderFactory.class) has to return null for Tomcat 6, understood.
>>>>
>>>> So this code should be wrong then, or?
>>>>
>>>> AbstractHttpDestination:376-382
>>>>
>>>> if (!isServlet3) {
>>>>      if (cproviderFactory != null) {
>>>>         return cproviderFactory.retrieveFromContinuation(req);
>>>>      }
>>>>      return null;
>>>> }
>>>> return retrieveFromServlet3Async(req);
>>>>
>>>> ---
>>>>
>>>> Ok, Tomcat 6, no continuation:
>>>>
>>>> !isServlet3 is true AND we do not have a cproviderFactory... so it will return null. Is this really true to return null here?
>>>
>>> I would assume so.  If it's not servlet3  (!isServlet3), we cannot use the servlet 3 stuff.  Without a ContinuationProviderFactory (only provided by Jetty 7.x) there is really nothing we can do from a continuation standpoint.  Continuations would not be supported at all.
>>>
>>> Dan
>>>
>>>
>>>>
>>>>
>>>> Best,
>>>> Marko
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>> Sent: Wednesday, August 15, 2012 11:29 AM
>>>> To: users@cxf.apache.org
>>>> Cc: Voß, Marko
>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>>>> update to CXF 2.6.1
>>>>
>>>> Hi
>>>> On 15/08/12 10:29, Voß, Marko wrote:
>>>>> Hello Daniel,
>>>>>
>>>>> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>>>>>
>>>>> I could not yet figure out, why
>>>>>
>>>>> if (!isServlet3)
>>>>>
>>>>> is true for this one service only...
>>>>>
>>>> Can you please create a war or Maven-based test case that can help us reproduce the issue ?
>>>>
>>>> Cheers, Sergey
>>>>
>>>>>
>>>>> best regards,
>>>>> Marko
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>>>> Sent: Monday, August 13, 2012 6:34 PM
>>>>> To: users@cxf.apache.org
>>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null 
>>>>> after update to CXF 2.6.1
>>>>>
>>>>>
>>>>> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>    wrote:
>>>>>
>>>>>> Hello again,
>>>>>>
>>>>>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>>>>>
>>>>>> What do I have to change to get this working with Tomcat 6?
>>>>>
>>>>> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>>>>>
>>>>>> Maybe we have to upgrade the container to Tomcat 7.
>>>>>
>>>>> This is definitely what I would suggest.
>>>>>
>>>>> Dan
>>>>>
>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>> Marko
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>>>> Sent: Thursday, August 09, 2012 9:48 PM
>>>>>> To: users@cxf.apache.org
>>>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null 
>>>>>> after update to CXF 2.6.1
>>>>>>
>>>>>> Hi Marko
>>>>>> On 09/08/12 14:04, Voß, Marko wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>>>>>
>>>>>>> Do you have any idea what could be wrong here? Obviously the code:
>>>>>>>
>>>>>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>>>>>
>>>>>>> What got changed here?
>>>>>>>
>>>>>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>>>>>
>>>>>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&    Jetty and see if you can reproduce the issue ?
>>>>>>
>>>>>> Thanks, Sergey
>>>>>>>
>>>>>>> Thank you and best regards,
>>>>>>> Marko
>>>>>>>
>>>>>>>
>>>>>>> -------------------------------------------------------
>>>>>>>
>>>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sergey Beryozkin
>>>>>>
>>>>>> Talend Community Coders
>>>>>> http://coders.talend.com/
>>>>>>
>>>>>> Blog: http://sberyozkin.blogspot.com
>>>>>>
>>>>>>
>>>>>> -------------------------------------------------------
>>>>>>
>>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Daniel Kulp
>>>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder 
>>>>> - http://coders.talend.com
>>>>>
>>>>>
>>>>>
>>>>> -------------------------------------------------------
>>>>>
>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>
>>>>>
>>>>
>>>>
>>>> -------------------------------------------------------
>>>>
>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>
>>>>
>>>
>>> --
>>> Daniel Kulp
>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
>>> http://coders.talend.com
>>>
>>>
>>>
>>> -------------------------------------------------------
>>>
>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>
>>>
>>
>>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 22/08/12 16:43, Voß, Marko wrote:
> Hello Sergey,
>
> We are using a self-written Stream class, which extends from OutputSream and offers a getInputStream-method.
>
> The purpose of this class is to write data to this stream, which will keep the data in memory as long as the threshold is not exceeded. Once the threshold is exceeded, the data will be written to a temporary file. Once the data is written and the stream gets closed, you can get as many InputStream instances on the data as you like.
> The idea behind this was, to be able to deal better with very large data in different kinds of circumstances.
>
> We are using a MessageBodyReader and -Writer to enable the usage of this class in the JAX-RS interface method signatures.
>
> The endpoint looks like this:
>
> @PUT
> @Produces(MediaType.TEXT_XML)
> ResultTO create(Stream stream);
>
> To sum this up:
>
> As long as we are using InputStream or our Stream class in the signatures, we cannot enable the DepthRestrictingStreamInterceptor.
>
> Are you going to fix this or do you leave this behavior as it is?
>
>> I'm not sure I can use DelegatingInputStream if InputStream is 'null'
> because that will bypass what this interceptor or other similar interceptors trying to do.
>
> Yep, using the DelegatingInputStream instead is no good idea then.
>

I'd phrase it differently :-), if one prefers to read directly from the 
input stream then CXF features which filter the incoming payload based 
on its content can not be applied. Only the logging feature or any other 
feature that does some opaque processing will work, but features like 
the depth restriction or transformation ones, that expect a structured 
(XML) payload can not be applied.

Note that CXF multipart handlers will manage the over-flow to the disk 
if needed. If it is XML (but without multiparts) and the effective 
processing is needed then I guess the option to try is to use Source, by 
default it will be CXF Stax source - the difference is that it will be 
able to work with XML stream readers that may be available.

Or, if possible, consider updating your Stream class to handle 
XMLStreamReader instance available on the message

Cheers, Sergey

> Best,
> Marko
>
>
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> Sent: Wednesday, August 22, 2012 5:08 PM
> To: users@cxf.apache.org
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1
>
> Hi Marko
>
>
> Thanks for the analysis,
>
> On 22/08/12 15:53, Voß, Marko wrote:
>> Hello again,
>>
>> I was able to figure out the cause of the problem.
>>
>> I introduced the
>> org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor some time ago. When disabling this feature, everything works.
>>
>> <bean id="depthInterceptor" class="org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor">
>>      <!-- Total number of elements in the XML payload -->
>>      <property name="elementCountThreshold" value="10000"/>
>>      <!-- Total number of child elements in the XML payload -->
>>      <property name="innerElementCountThreshold" value="6000"/>
>>      <!-- Maximum stack depth of the XML payload -->
>>      <property name="innerElementLevelThreshold" value="40"/>  </bean>
>>
>> <jaxrs:server id="RestServices" address="" staticSubresourceResolution="true">
>>      ...
>>      <jaxrs:inInterceptors>
>>        <ref bean="depthInterceptor"/>
>>      </jaxrs:inInterceptors>
>> </jaxrs:server>
>>
>>
>> I saw, that the AbstractHTTPDestination is creating a new Message
>> instance, registering the InputStream of the request with the following keys:
>>
>> - DelegatingInputStream.class
>> - InputStream.class
>>
>> The cause of the error is at: org.apache.cxf.jaxrs.utils.JAXRSUtils#processParameter line 599:
>>
>> InputStream is = message.getContent(InputStream.class);
>>
>> This returns null. When debugging, I tested
>> message.getContent(DelegatingInputStream.class) and it worked, returning the expected result.
>>
>>
>> I believe, that there is a bug in the logic of:
>>
>> org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor#
>> handleMessage
>>
>> because the code is setting the InputStream.class entry value to null
>> at line 77 and maybe some future logic is not fixing this.
>>
>>
>> The service, which does not work, is responsible for uploading any
>> kind of data. The service endpoint method is PUT as noted before I think. Can I even use the DepthInterceptor, if a service is dealing with - maybe large - binary data?
>>
> Do you have 'InputStream' input parameter in the resource method ?
>
> I'm asking because I have a couple of tests (POST is used, but same would work with PUT) where this interceptor is also used and all works OK, the message is deserialized.
>
> However if it is InputStream that is expected than it won't work indeed.
> I'm not sure I can use DelegatingInputStream if InputStream is 'null'
> because that will bypass what this interceptor or other similar interceptors trying to do.
>
> Assuming it is InputStream that you have in the resource method signature, can you replace it with JAXP Source instead ? That will work with this interceptor
>
> Cheers, Sergey
>
>
>>
>> best regards,
>> Marko
>>
>>
>> Am 22.08.2012 11:36, schrieb Voß, Marko:
>>> Hello Dan,
>>>
>>> I understand. So you are saying, the application should not even enter this method. Maybe this helps me, to figure out the problem on my own.
>>>
>>>
>>> Thanks so far and regards,
>>> Marko
>>>
>>>
>>> -----Original Message-----
>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>> Sent: Tuesday, August 21, 2012 7:09 PM
>>> To: users@cxf.apache.org
>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>> update to CXF 2.6.1
>>>
>>>
>>> On Aug 21, 2012, at 9:28 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>   wrote:
>>>
>>>> Hello Sergey, hello Dan,
>>>>
>>>> I tried to create a simple project in order to reproduce the error but I failed so far. The origin project is a bit too complex to simply create a little copy of it. I am working on it.
>>>>
>>>> Question:
>>>>
>>>> Bus.getExtension(ContinuationProviderFactory.class) has to return null for Tomcat 6, understood.
>>>>
>>>> So this code should be wrong then, or?
>>>>
>>>> AbstractHttpDestination:376-382
>>>>
>>>> if (!isServlet3) {
>>>>      if (cproviderFactory != null) {
>>>>         return cproviderFactory.retrieveFromContinuation(req);
>>>>      }
>>>>      return null;
>>>> }
>>>> return retrieveFromServlet3Async(req);
>>>>
>>>> ---
>>>>
>>>> Ok, Tomcat 6, no continuation:
>>>>
>>>> !isServlet3 is true AND we do not have a cproviderFactory... so it will return null. Is this really true to return null here?
>>>
>>> I would assume so.  If it's not servlet3  (!isServlet3), we cannot use the servlet 3 stuff.  Without a ContinuationProviderFactory (only provided by Jetty 7.x) there is really nothing we can do from a continuation standpoint.  Continuations would not be supported at all.
>>>
>>> Dan
>>>
>>>
>>>>
>>>>
>>>> Best,
>>>> Marko
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>> Sent: Wednesday, August 15, 2012 11:29 AM
>>>> To: users@cxf.apache.org
>>>> Cc: Voß, Marko
>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>>> update to CXF 2.6.1
>>>>
>>>> Hi
>>>> On 15/08/12 10:29, Voß, Marko wrote:
>>>>> Hello Daniel,
>>>>>
>>>>> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>>>>>
>>>>> I could not yet figure out, why
>>>>>
>>>>> if (!isServlet3)
>>>>>
>>>>> is true for this one service only...
>>>>>
>>>> Can you please create a war or Maven-based test case that can help us reproduce the issue ?
>>>>
>>>> Cheers, Sergey
>>>>
>>>>>
>>>>> best regards,
>>>>> Marko
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>>>> Sent: Monday, August 13, 2012 6:34 PM
>>>>> To: users@cxf.apache.org
>>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>>>> update to CXF 2.6.1
>>>>>
>>>>>
>>>>> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>    wrote:
>>>>>
>>>>>> Hello again,
>>>>>>
>>>>>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>>>>>
>>>>>> What do I have to change to get this working with Tomcat 6?
>>>>>
>>>>> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>>>>>
>>>>>> Maybe we have to upgrade the container to Tomcat 7.
>>>>>
>>>>> This is definitely what I would suggest.
>>>>>
>>>>> Dan
>>>>>
>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>> Marko
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>>>> Sent: Thursday, August 09, 2012 9:48 PM
>>>>>> To: users@cxf.apache.org
>>>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null
>>>>>> after update to CXF 2.6.1
>>>>>>
>>>>>> Hi Marko
>>>>>> On 09/08/12 14:04, Voß, Marko wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>>>>>
>>>>>>> Do you have any idea what could be wrong here? Obviously the code:
>>>>>>>
>>>>>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>>>>>
>>>>>>> What got changed here?
>>>>>>>
>>>>>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>>>>>
>>>>>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&    Jetty and see if you can reproduce the issue ?
>>>>>>
>>>>>> Thanks, Sergey
>>>>>>>
>>>>>>> Thank you and best regards,
>>>>>>> Marko
>>>>>>>
>>>>>>>
>>>>>>> -------------------------------------------------------
>>>>>>>
>>>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sergey Beryozkin
>>>>>>
>>>>>> Talend Community Coders
>>>>>> http://coders.talend.com/
>>>>>>
>>>>>> Blog: http://sberyozkin.blogspot.com
>>>>>>
>>>>>>
>>>>>> -------------------------------------------------------
>>>>>>
>>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Daniel Kulp
>>>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder -
>>>>> http://coders.talend.com
>>>>>
>>>>>
>>>>>
>>>>> -------------------------------------------------------
>>>>>
>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>
>>>>>
>>>>
>>>>
>>>> -------------------------------------------------------
>>>>
>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>
>>>>
>>>
>>> --
>>> Daniel Kulp
>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder -
>>> http://coders.talend.com
>>>
>>>
>>>
>>> -------------------------------------------------------
>>>
>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>
>>>
>>
>>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

RE: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Voß, Marko <Ma...@fiz-Karlsruhe.de>.
Hello Sergey,

We are using a self-written Stream class, which extends from OutputSream and offers a getInputStream-method.

The purpose of this class is to write data to this stream, which will keep the data in memory as long as the threshold is not exceeded. Once the threshold is exceeded, the data will be written to a temporary file. Once the data is written and the stream gets closed, you can get as many InputStream instances on the data as you like.
The idea behind this was, to be able to deal better with very large data in different kinds of circumstances.

We are using a MessageBodyReader and -Writer to enable the usage of this class in the JAX-RS interface method signatures.

The endpoint looks like this:

@PUT
@Produces(MediaType.TEXT_XML)
ResultTO create(Stream stream);

To sum this up:

As long as we are using InputStream or our Stream class in the signatures, we cannot enable the DepthRestrictingStreamInterceptor.

Are you going to fix this or do you leave this behavior as it is?

> I'm not sure I can use DelegatingInputStream if InputStream is 'null' 
because that will bypass what this interceptor or other similar interceptors trying to do.

Yep, using the DelegatingInputStream instead is no good idea then. 

Best,
Marko


-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Wednesday, August 22, 2012 5:08 PM
To: users@cxf.apache.org
Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Hi Marko


Thanks for the analysis,

On 22/08/12 15:53, Voß, Marko wrote:
> Hello again,
>
> I was able to figure out the cause of the problem.
>
> I introduced the 
> org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor some time ago. When disabling this feature, everything works.
>
> <bean id="depthInterceptor" class="org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor">
>     <!-- Total number of elements in the XML payload -->
>     <property name="elementCountThreshold" value="10000"/>
>     <!-- Total number of child elements in the XML payload -->
>     <property name="innerElementCountThreshold" value="6000"/>
>     <!-- Maximum stack depth of the XML payload -->
>     <property name="innerElementLevelThreshold" value="40"/> </bean>
>
> <jaxrs:server id="RestServices" address="" staticSubresourceResolution="true">
>     ...
>     <jaxrs:inInterceptors>
>       <ref bean="depthInterceptor"/>
>     </jaxrs:inInterceptors>
> </jaxrs:server>
>
>
> I saw, that the AbstractHTTPDestination is creating a new Message 
> instance, registering the InputStream of the request with the following keys:
>
> - DelegatingInputStream.class
> - InputStream.class
>
> The cause of the error is at: org.apache.cxf.jaxrs.utils.JAXRSUtils#processParameter line 599:
>
> InputStream is = message.getContent(InputStream.class);
>
> This returns null. When debugging, I tested 
> message.getContent(DelegatingInputStream.class) and it worked, returning the expected result.
>
>
> I believe, that there is a bug in the logic of:
>
> org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor#
> handleMessage
>
> because the code is setting the InputStream.class entry value to null 
> at line 77 and maybe some future logic is not fixing this.
>
>
> The service, which does not work, is responsible for uploading any 
> kind of data. The service endpoint method is PUT as noted before I think. Can I even use the DepthInterceptor, if a service is dealing with - maybe large - binary data?
>
Do you have 'InputStream' input parameter in the resource method ?

I'm asking because I have a couple of tests (POST is used, but same would work with PUT) where this interceptor is also used and all works OK, the message is deserialized.

However if it is InputStream that is expected than it won't work indeed.
I'm not sure I can use DelegatingInputStream if InputStream is 'null' 
because that will bypass what this interceptor or other similar interceptors trying to do.

Assuming it is InputStream that you have in the resource method signature, can you replace it with JAXP Source instead ? That will work with this interceptor

Cheers, Sergey


>
> best regards,
> Marko
>
>
> Am 22.08.2012 11:36, schrieb Voß, Marko:
>> Hello Dan,
>>
>> I understand. So you are saying, the application should not even enter this method. Maybe this helps me, to figure out the problem on my own.
>>
>>
>> Thanks so far and regards,
>> Marko
>>
>>
>> -----Original Message-----
>> From: Daniel Kulp [mailto:dkulp@apache.org]
>> Sent: Tuesday, August 21, 2012 7:09 PM
>> To: users@cxf.apache.org
>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>> update to CXF 2.6.1
>>
>>
>> On Aug 21, 2012, at 9:28 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>  wrote:
>>
>>> Hello Sergey, hello Dan,
>>>
>>> I tried to create a simple project in order to reproduce the error but I failed so far. The origin project is a bit too complex to simply create a little copy of it. I am working on it.
>>>
>>> Question:
>>>
>>> Bus.getExtension(ContinuationProviderFactory.class) has to return null for Tomcat 6, understood.
>>>
>>> So this code should be wrong then, or?
>>>
>>> AbstractHttpDestination:376-382
>>>
>>> if (!isServlet3) {
>>>     if (cproviderFactory != null) {
>>>        return cproviderFactory.retrieveFromContinuation(req);
>>>     }
>>>     return null;
>>> }
>>> return retrieveFromServlet3Async(req);
>>>
>>> ---
>>>
>>> Ok, Tomcat 6, no continuation:
>>>
>>> !isServlet3 is true AND we do not have a cproviderFactory... so it will return null. Is this really true to return null here?
>>
>> I would assume so.  If it's not servlet3  (!isServlet3), we cannot use the servlet 3 stuff.  Without a ContinuationProviderFactory (only provided by Jetty 7.x) there is really nothing we can do from a continuation standpoint.  Continuations would not be supported at all.
>>
>> Dan
>>
>>
>>>
>>>
>>> Best,
>>> Marko
>>>
>>>
>>> -----Original Message-----
>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>> Sent: Wednesday, August 15, 2012 11:29 AM
>>> To: users@cxf.apache.org
>>> Cc: Voß, Marko
>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>>> update to CXF 2.6.1
>>>
>>> Hi
>>> On 15/08/12 10:29, Voß, Marko wrote:
>>>> Hello Daniel,
>>>>
>>>> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>>>>
>>>> I could not yet figure out, why
>>>>
>>>> if (!isServlet3)
>>>>
>>>> is true for this one service only...
>>>>
>>> Can you please create a war or Maven-based test case that can help us reproduce the issue ?
>>>
>>> Cheers, Sergey
>>>
>>>>
>>>> best regards,
>>>> Marko
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>>> Sent: Monday, August 13, 2012 6:34 PM
>>>> To: users@cxf.apache.org
>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>>>> update to CXF 2.6.1
>>>>
>>>>
>>>> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>   wrote:
>>>>
>>>>> Hello again,
>>>>>
>>>>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>>>>
>>>>> What do I have to change to get this working with Tomcat 6?
>>>>
>>>> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>>>>
>>>>> Maybe we have to upgrade the container to Tomcat 7.
>>>>
>>>> This is definitely what I would suggest.
>>>>
>>>> Dan
>>>>
>>>>
>>>>>
>>>>> Best regards,
>>>>> Marko
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>>> Sent: Thursday, August 09, 2012 9:48 PM
>>>>> To: users@cxf.apache.org
>>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null 
>>>>> after update to CXF 2.6.1
>>>>>
>>>>> Hi Marko
>>>>> On 09/08/12 14:04, Voß, Marko wrote:
>>>>>> Hello,
>>>>>>
>>>>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>>>>
>>>>>> Do you have any idea what could be wrong here? Obviously the code:
>>>>>>
>>>>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>>>>
>>>>>> What got changed here?
>>>>>>
>>>>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>>>>
>>>>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&   Jetty and see if you can reproduce the issue ?
>>>>>
>>>>> Thanks, Sergey
>>>>>>
>>>>>> Thank you and best regards,
>>>>>> Marko
>>>>>>
>>>>>>
>>>>>> -------------------------------------------------------
>>>>>>
>>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sergey Beryozkin
>>>>>
>>>>> Talend Community Coders
>>>>> http://coders.talend.com/
>>>>>
>>>>> Blog: http://sberyozkin.blogspot.com
>>>>>
>>>>>
>>>>> -------------------------------------------------------
>>>>>
>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>
>>>>>
>>>>
>>>> --
>>>> Daniel Kulp
>>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
>>>> http://coders.talend.com
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------
>>>>
>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>
>>>>
>>>
>>>
>>> -------------------------------------------------------
>>>
>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>
>>>
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
>> http://coders.talend.com
>>
>>
>>
>> -------------------------------------------------------
>>
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>
>>
>
>


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Marko


Thanks for the analysis,

On 22/08/12 15:53, Voß, Marko wrote:
> Hello again,
>
> I was able to figure out the cause of the problem.
>
> I introduced the org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor some time ago. When disabling
> this feature, everything works.
>
> <bean id="depthInterceptor" class="org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor">
>     <!-- Total number of elements in the XML payload -->
>     <property name="elementCountThreshold" value="10000"/>
>     <!-- Total number of child elements in the XML payload -->
>     <property name="innerElementCountThreshold" value="6000"/>
>     <!-- Maximum stack depth of the XML payload -->
>     <property name="innerElementLevelThreshold" value="40"/>
> </bean>
>
> <jaxrs:server id="RestServices" address="" staticSubresourceResolution="true">
>     ...
>     <jaxrs:inInterceptors>
>       <ref bean="depthInterceptor"/>
>     </jaxrs:inInterceptors>
> </jaxrs:server>
>
>
> I saw, that the AbstractHTTPDestination is creating a new Message instance, registering the InputStream of the request
> with the following keys:
>
> - DelegatingInputStream.class
> - InputStream.class
>
> The cause of the error is at: org.apache.cxf.jaxrs.utils.JAXRSUtils#processParameter line 599:
>
> InputStream is = message.getContent(InputStream.class);
>
> This returns null. When debugging, I tested message.getContent(DelegatingInputStream.class) and it worked, returning the
> expected result.
>
>
> I believe, that there is a bug in the logic of:
>
> org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor#handleMessage
>
> because the code is setting the InputStream.class entry value to null at line 77 and maybe some future logic is not
> fixing this.
>
>
> The service, which does not work, is responsible for uploading any kind of data. The service endpoint method is PUT as
> noted before I think. Can I even use the DepthInterceptor, if a service is dealing with - maybe large - binary data?
>
Do you have 'InputStream' input parameter in the resource method ?

I'm asking because I have a couple of tests (POST is used, but same 
would work with PUT) where this interceptor is also used and all works 
OK, the message is deserialized.

However if it is InputStream that is expected than it won't work indeed.
I'm not sure I can use DelegatingInputStream if InputStream is 'null' 
because that will bypass what this interceptor or other similar 
interceptors trying to do.

Assuming it is InputStream that you have in the resource method 
signature, can you replace it with JAXP Source instead ? That will work 
with this interceptor

Cheers, Sergey


>
> best regards,
> Marko
>
>
> Am 22.08.2012 11:36, schrieb Voß, Marko:
>> Hello Dan,
>>
>> I understand. So you are saying, the application should not even enter this method. Maybe this helps me, to figure out the problem on my own.
>>
>>
>> Thanks so far and regards,
>> Marko
>>
>>
>> -----Original Message-----
>> From: Daniel Kulp [mailto:dkulp@apache.org]
>> Sent: Tuesday, August 21, 2012 7:09 PM
>> To: users@cxf.apache.org
>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1
>>
>>
>> On Aug 21, 2012, at 9:28 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>  wrote:
>>
>>> Hello Sergey, hello Dan,
>>>
>>> I tried to create a simple project in order to reproduce the error but I failed so far. The origin project is a bit too complex to simply create a little copy of it. I am working on it.
>>>
>>> Question:
>>>
>>> Bus.getExtension(ContinuationProviderFactory.class) has to return null for Tomcat 6, understood.
>>>
>>> So this code should be wrong then, or?
>>>
>>> AbstractHttpDestination:376-382
>>>
>>> if (!isServlet3) {
>>>     if (cproviderFactory != null) {
>>>        return cproviderFactory.retrieveFromContinuation(req);
>>>     }
>>>     return null;
>>> }
>>> return retrieveFromServlet3Async(req);
>>>
>>> ---
>>>
>>> Ok, Tomcat 6, no continuation:
>>>
>>> !isServlet3 is true AND we do not have a cproviderFactory... so it will return null. Is this really true to return null here?
>>
>> I would assume so.  If it's not servlet3  (!isServlet3), we cannot use the servlet 3 stuff.  Without a ContinuationProviderFactory (only provided by Jetty 7.x) there is really nothing we can do from a continuation standpoint.  Continuations would not be supported at all.
>>
>> Dan
>>
>>
>>>
>>>
>>> Best,
>>> Marko
>>>
>>>
>>> -----Original Message-----
>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>> Sent: Wednesday, August 15, 2012 11:29 AM
>>> To: users@cxf.apache.org
>>> Cc: Voß, Marko
>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>> update to CXF 2.6.1
>>>
>>> Hi
>>> On 15/08/12 10:29, Voß, Marko wrote:
>>>> Hello Daniel,
>>>>
>>>> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>>>>
>>>> I could not yet figure out, why
>>>>
>>>> if (!isServlet3)
>>>>
>>>> is true for this one service only...
>>>>
>>> Can you please create a war or Maven-based test case that can help us reproduce the issue ?
>>>
>>> Cheers, Sergey
>>>
>>>>
>>>> best regards,
>>>> Marko
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>>> Sent: Monday, August 13, 2012 6:34 PM
>>>> To: users@cxf.apache.org
>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>>> update to CXF 2.6.1
>>>>
>>>>
>>>> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>   wrote:
>>>>
>>>>> Hello again,
>>>>>
>>>>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>>>>
>>>>> What do I have to change to get this working with Tomcat 6?
>>>>
>>>> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>>>>
>>>>> Maybe we have to upgrade the container to Tomcat 7.
>>>>
>>>> This is definitely what I would suggest.
>>>>
>>>> Dan
>>>>
>>>>
>>>>>
>>>>> Best regards,
>>>>> Marko
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>>> Sent: Thursday, August 09, 2012 9:48 PM
>>>>> To: users@cxf.apache.org
>>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>>>> update to CXF 2.6.1
>>>>>
>>>>> Hi Marko
>>>>> On 09/08/12 14:04, Voß, Marko wrote:
>>>>>> Hello,
>>>>>>
>>>>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>>>>
>>>>>> Do you have any idea what could be wrong here? Obviously the code:
>>>>>>
>>>>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>>>>
>>>>>> What got changed here?
>>>>>>
>>>>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>>>>
>>>>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&   Jetty and see if you can reproduce the issue ?
>>>>>
>>>>> Thanks, Sergey
>>>>>>
>>>>>> Thank you and best regards,
>>>>>> Marko
>>>>>>
>>>>>>
>>>>>> -------------------------------------------------------
>>>>>>
>>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sergey Beryozkin
>>>>>
>>>>> Talend Community Coders
>>>>> http://coders.talend.com/
>>>>>
>>>>> Blog: http://sberyozkin.blogspot.com
>>>>>
>>>>>
>>>>> -------------------------------------------------------
>>>>>
>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>
>>>>>
>>>>
>>>> --
>>>> Daniel Kulp
>>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder -
>>>> http://coders.talend.com
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------
>>>>
>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>
>>>>
>>>
>>>
>>> -------------------------------------------------------
>>>
>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>
>>>
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
>>
>>
>>
>> -------------------------------------------------------
>>
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>
>>
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Voß, Marko <Ma...@fiz-Karlsruhe.de>.
Hello again,

I was able to figure out the cause of the problem.

I introduced the org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor some time ago. When disabling 
this feature, everything works.

<bean id="depthInterceptor" class="org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor">
   <!-- Total number of elements in the XML payload -->
   <property name="elementCountThreshold" value="10000"/>
   <!-- Total number of child elements in the XML payload -->
   <property name="innerElementCountThreshold" value="6000"/>
   <!-- Maximum stack depth of the XML payload -->
   <property name="innerElementLevelThreshold" value="40"/>
</bean>

<jaxrs:server id="RestServices" address="" staticSubresourceResolution="true">
   ...
   <jaxrs:inInterceptors>
     <ref bean="depthInterceptor"/>
   </jaxrs:inInterceptors>
</jaxrs:server>


I saw, that the AbstractHTTPDestination is creating a new Message instance, registering the InputStream of the request 
with the following keys:

- DelegatingInputStream.class
- InputStream.class

The cause of the error is at: org.apache.cxf.jaxrs.utils.JAXRSUtils#processParameter line 599:

InputStream is = message.getContent(InputStream.class);

This returns null. When debugging, I tested message.getContent(DelegatingInputStream.class) and it worked, returning the 
expected result.


I believe, that there is a bug in the logic of:

org.apache.cxf.interceptor.security.DepthRestrictingStreamInterceptor#handleMessage

because the code is setting the InputStream.class entry value to null at line 77 and maybe some future logic is not 
fixing this.


The service, which does not work, is responsible for uploading any kind of data. The service endpoint method is PUT as 
noted before I think. Can I even use the DepthInterceptor, if a service is dealing with - maybe large - binary data?


best regards,
Marko


Am 22.08.2012 11:36, schrieb Voß, Marko:
> Hello Dan,
>
> I understand. So you are saying, the application should not even enter this method. Maybe this helps me, to figure out the problem on my own.
>
>
> Thanks so far and regards,
> Marko
>
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Tuesday, August 21, 2012 7:09 PM
> To: users@cxf.apache.org
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1
>
>
> On Aug 21, 2012, at 9:28 AM, "Voß, Marko" <Ma...@fiz-Karlsruhe.de> wrote:
>
>> Hello Sergey, hello Dan,
>>
>> I tried to create a simple project in order to reproduce the error but I failed so far. The origin project is a bit too complex to simply create a little copy of it. I am working on it.
>>
>> Question:
>>
>> Bus.getExtension(ContinuationProviderFactory.class) has to return null for Tomcat 6, understood.
>>
>> So this code should be wrong then, or?
>>
>> AbstractHttpDestination:376-382
>>
>> if (!isServlet3) {
>>    if (cproviderFactory != null) {
>>       return cproviderFactory.retrieveFromContinuation(req);
>>    }
>>    return null;
>> }
>> return retrieveFromServlet3Async(req);
>>
>> ---
>>
>> Ok, Tomcat 6, no continuation:
>>
>> !isServlet3 is true AND we do not have a cproviderFactory... so it will return null. Is this really true to return null here?
>
> I would assume so.  If it's not servlet3  (!isServlet3), we cannot use the servlet 3 stuff.  Without a ContinuationProviderFactory (only provided by Jetty 7.x) there is really nothing we can do from a continuation standpoint.  Continuations would not be supported at all.
>
> Dan
>
>
>>
>>
>> Best,
>> Marko
>>
>>
>> -----Original Message-----
>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>> Sent: Wednesday, August 15, 2012 11:29 AM
>> To: users@cxf.apache.org
>> Cc: Voß, Marko
>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>> update to CXF 2.6.1
>>
>> Hi
>> On 15/08/12 10:29, Voß, Marko wrote:
>>> Hello Daniel,
>>>
>>> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>>>
>>> I could not yet figure out, why
>>>
>>> if (!isServlet3)
>>>
>>> is true for this one service only...
>>>
>> Can you please create a war or Maven-based test case that can help us reproduce the issue ?
>>
>> Cheers, Sergey
>>
>>>
>>> best regards,
>>> Marko
>>>
>>>
>>> -----Original Message-----
>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>> Sent: Monday, August 13, 2012 6:34 PM
>>> To: users@cxf.apache.org
>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>> update to CXF 2.6.1
>>>
>>>
>>> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>  wrote:
>>>
>>>> Hello again,
>>>>
>>>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>>>
>>>> What do I have to change to get this working with Tomcat 6?
>>>
>>> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>>>
>>>> Maybe we have to upgrade the container to Tomcat 7.
>>>
>>> This is definitely what I would suggest.
>>>
>>> Dan
>>>
>>>
>>>>
>>>> Best regards,
>>>> Marko
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>> Sent: Thursday, August 09, 2012 9:48 PM
>>>> To: users@cxf.apache.org
>>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>>>> update to CXF 2.6.1
>>>>
>>>> Hi Marko
>>>> On 09/08/12 14:04, Voß, Marko wrote:
>>>>> Hello,
>>>>>
>>>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>>>
>>>>> Do you have any idea what could be wrong here? Obviously the code:
>>>>>
>>>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>>>
>>>>> What got changed here?
>>>>>
>>>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>>>
>>>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&  Jetty and see if you can reproduce the issue ?
>>>>
>>>> Thanks, Sergey
>>>>>
>>>>> Thank you and best regards,
>>>>> Marko
>>>>>
>>>>>
>>>>> -------------------------------------------------------
>>>>>
>>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Sergey Beryozkin
>>>>
>>>> Talend Community Coders
>>>> http://coders.talend.com/
>>>>
>>>> Blog: http://sberyozkin.blogspot.com
>>>>
>>>>
>>>> -------------------------------------------------------
>>>>
>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>>
>>>>
>>>
>>> --
>>> Daniel Kulp
>>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder -
>>> http://coders.talend.com
>>>
>>>
>>>
>>> -------------------------------------------------------
>>>
>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>
>>>
>>
>>
>> -------------------------------------------------------
>>
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>
>>
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
>
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>


-- 
Marko Voß
ePublishing & eScience
Development & Applied Research
Phone +49 7247 808-744
Fax +49 7247 808-133
marko.voss@fiz-karlsruhe.de


FIZ Karlsruhe - Leibniz Institute for Information Infrastructure
Hermann-von-Helmholtz-Platz 1
76344 Eggenstein-Leopoldshafen, Germany

www.fiz-karlsruhe.de


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



RE: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Voß, Marko <Ma...@fiz-Karlsruhe.de>.
Hello Dan,

I understand. So you are saying, the application should not even enter this method. Maybe this helps me, to figure out the problem on my own.


Thanks so far and regards,
Marko


-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Tuesday, August 21, 2012 7:09 PM
To: users@cxf.apache.org
Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1


On Aug 21, 2012, at 9:28 AM, "Voß, Marko" <Ma...@fiz-Karlsruhe.de> wrote:

> Hello Sergey, hello Dan,
> 
> I tried to create a simple project in order to reproduce the error but I failed so far. The origin project is a bit too complex to simply create a little copy of it. I am working on it.
> 
> Question:
> 
> Bus.getExtension(ContinuationProviderFactory.class) has to return null for Tomcat 6, understood.
> 
> So this code should be wrong then, or?
> 
> AbstractHttpDestination:376-382
> 
> if (!isServlet3) {
>   if (cproviderFactory != null) {
>      return cproviderFactory.retrieveFromContinuation(req);
>   }
>   return null;
> }
> return retrieveFromServlet3Async(req);
> 
> ---
> 
> Ok, Tomcat 6, no continuation:
> 
> !isServlet3 is true AND we do not have a cproviderFactory... so it will return null. Is this really true to return null here?

I would assume so.  If it's not servlet3  (!isServlet3), we cannot use the servlet 3 stuff.  Without a ContinuationProviderFactory (only provided by Jetty 7.x) there is really nothing we can do from a continuation standpoint.  Continuations would not be supported at all.

Dan


> 
> 
> Best,
> Marko
> 
> 
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> Sent: Wednesday, August 15, 2012 11:29 AM
> To: users@cxf.apache.org
> Cc: Voß, Marko
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
> update to CXF 2.6.1
> 
> Hi
> On 15/08/12 10:29, Voß, Marko wrote:
>> Hello Daniel,
>> 
>> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>> 
>> I could not yet figure out, why
>> 
>> if (!isServlet3)
>> 
>> is true for this one service only...
>> 
> Can you please create a war or Maven-based test case that can help us reproduce the issue ?
> 
> Cheers, Sergey
> 
>> 
>> best regards,
>> Marko
>> 
>> 
>> -----Original Message-----
>> From: Daniel Kulp [mailto:dkulp@apache.org]
>> Sent: Monday, August 13, 2012 6:34 PM
>> To: users@cxf.apache.org
>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>> update to CXF 2.6.1
>> 
>> 
>> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>  wrote:
>> 
>>> Hello again,
>>> 
>>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>> 
>>> What do I have to change to get this working with Tomcat 6?
>> 
>> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>> 
>>> Maybe we have to upgrade the container to Tomcat 7.
>> 
>> This is definitely what I would suggest.
>> 
>> Dan
>> 
>> 
>>> 
>>> Best regards,
>>> Marko
>>> 
>>> 
>>> -----Original Message-----
>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>> Sent: Thursday, August 09, 2012 9:48 PM
>>> To: users@cxf.apache.org
>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>>> update to CXF 2.6.1
>>> 
>>> Hi Marko
>>> On 09/08/12 14:04, Voß, Marko wrote:
>>>> Hello,
>>>> 
>>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>> 
>>>> Do you have any idea what could be wrong here? Obviously the code:
>>>> 
>>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>> 
>>>> What got changed here?
>>>> 
>>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>> 
>>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&  Jetty and see if you can reproduce the issue ?
>>> 
>>> Thanks, Sergey
>>>> 
>>>> Thank you and best regards,
>>>> Marko
>>>> 
>>>> 
>>>> -------------------------------------------------------
>>>> 
>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Sergey Beryozkin
>>> 
>>> Talend Community Coders
>>> http://coders.talend.com/
>>> 
>>> Blog: http://sberyozkin.blogspot.com
>>> 
>>> 
>>> -------------------------------------------------------
>>> 
>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>> 
>>> 
>> 
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
>> http://coders.talend.com
>> 
>> 
>> 
>> -------------------------------------------------------
>> 
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>> 
>> 
> 
> 
> -------------------------------------------------------
> 
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
> Geschäftsführerin: Sabine Brünger-Weilandt. 
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
> 
> 

--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com



-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Daniel Kulp <dk...@apache.org>.
On Aug 21, 2012, at 9:28 AM, "Voß, Marko" <Ma...@fiz-Karlsruhe.de> wrote:

> Hello Sergey, hello Dan,
> 
> I tried to create a simple project in order to reproduce the error but I failed so far. The origin project is a bit too complex to simply create a little copy of it. I am working on it.
> 
> Question:
> 
> Bus.getExtension(ContinuationProviderFactory.class) has to return null for Tomcat 6, understood.
> 
> So this code should be wrong then, or?
> 
> AbstractHttpDestination:376-382
> 
> if (!isServlet3) {
>   if (cproviderFactory != null) {
>      return cproviderFactory.retrieveFromContinuation(req);
>   }
>   return null;
> }
> return retrieveFromServlet3Async(req);
> 
> ---
> 
> Ok, Tomcat 6, no continuation:
> 
> !isServlet3 is true AND we do not have a cproviderFactory... so it will return null. Is this really true to return null here?

I would assume so.  If it's not servlet3  (!isServlet3), we cannot use the servlet 3 stuff.  Without a ContinuationProviderFactory (only provided by Jetty 7.x) there is really nothing we can do from a continuation standpoint.  Continuations would not be supported at all.

Dan


> 
> 
> Best,
> Marko
> 
> 
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
> Sent: Wednesday, August 15, 2012 11:29 AM
> To: users@cxf.apache.org
> Cc: Voß, Marko
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1
> 
> Hi
> On 15/08/12 10:29, Voß, Marko wrote:
>> Hello Daniel,
>> 
>> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>> 
>> I could not yet figure out, why
>> 
>> if (!isServlet3)
>> 
>> is true for this one service only...
>> 
> Can you please create a war or Maven-based test case that can help us reproduce the issue ?
> 
> Cheers, Sergey
> 
>> 
>> best regards,
>> Marko
>> 
>> 
>> -----Original Message-----
>> From: Daniel Kulp [mailto:dkulp@apache.org]
>> Sent: Monday, August 13, 2012 6:34 PM
>> To: users@cxf.apache.org
>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>> update to CXF 2.6.1
>> 
>> 
>> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>  wrote:
>> 
>>> Hello again,
>>> 
>>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>> 
>>> What do I have to change to get this working with Tomcat 6?
>> 
>> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>> 
>>> Maybe we have to upgrade the container to Tomcat 7.
>> 
>> This is definitely what I would suggest.
>> 
>> Dan
>> 
>> 
>>> 
>>> Best regards,
>>> Marko
>>> 
>>> 
>>> -----Original Message-----
>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>> Sent: Thursday, August 09, 2012 9:48 PM
>>> To: users@cxf.apache.org
>>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>>> update to CXF 2.6.1
>>> 
>>> Hi Marko
>>> On 09/08/12 14:04, Voß, Marko wrote:
>>>> Hello,
>>>> 
>>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>> 
>>>> Do you have any idea what could be wrong here? Obviously the code:
>>>> 
>>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>> 
>>>> What got changed here?
>>>> 
>>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>> 
>>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&  Jetty and see if you can reproduce the issue ?
>>> 
>>> Thanks, Sergey
>>>> 
>>>> Thank you and best regards,
>>>> Marko
>>>> 
>>>> 
>>>> -------------------------------------------------------
>>>> 
>>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Sergey Beryozkin
>>> 
>>> Talend Community Coders
>>> http://coders.talend.com/
>>> 
>>> Blog: http://sberyozkin.blogspot.com
>>> 
>>> 
>>> -------------------------------------------------------
>>> 
>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>> 
>>> 
>> 
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
>> http://coders.talend.com
>> 
>> 
>> 
>> -------------------------------------------------------
>> 
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>> 
>> 
> 
> 
> -------------------------------------------------------
> 
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
> Geschäftsführerin: Sabine Brünger-Weilandt. 
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
> 
> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


RE: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Voß, Marko <Ma...@fiz-Karlsruhe.de>.
Hello Sergey, hello Dan,

I tried to create a simple project in order to reproduce the error but I failed so far. The origin project is a bit too complex to simply create a little copy of it. I am working on it.

Question:

Bus.getExtension(ContinuationProviderFactory.class) has to return null for Tomcat 6, understood.

So this code should be wrong then, or?

AbstractHttpDestination:376-382

if (!isServlet3) {
   if (cproviderFactory != null) {
      return cproviderFactory.retrieveFromContinuation(req);
   }
   return null;
}
return retrieveFromServlet3Async(req);

---

Ok, Tomcat 6, no continuation:

!isServlet3 is true AND we do not have a cproviderFactory... so it will return null. Is this really true to return null here?


Best,
Marko


-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Wednesday, August 15, 2012 11:29 AM
To: users@cxf.apache.org
Cc: Voß, Marko
Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Hi
On 15/08/12 10:29, Voß, Marko wrote:
> Hello Daniel,
>
> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>
> I could not yet figure out, why
>
> if (!isServlet3)
>
> is true for this one service only...
>
Can you please create a war or Maven-based test case that can help us reproduce the issue ?

Cheers, Sergey

>
> best regards,
> Marko
>
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, August 13, 2012 6:34 PM
> To: users@cxf.apache.org
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
> update to CXF 2.6.1
>
>
> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>  wrote:
>
>> Hello again,
>>
>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>
>> What do I have to change to get this working with Tomcat 6?
>
> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>
>> Maybe we have to upgrade the container to Tomcat 7.
>
> This is definitely what I would suggest.
>
> Dan
>
>
>>
>> Best regards,
>> Marko
>>
>>
>> -----Original Message-----
>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>> Sent: Thursday, August 09, 2012 9:48 PM
>> To: users@cxf.apache.org
>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
>> update to CXF 2.6.1
>>
>> Hi Marko
>> On 09/08/12 14:04, Voß, Marko wrote:
>>> Hello,
>>>
>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>
>>> Do you have any idea what could be wrong here? Obviously the code:
>>>
>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>
>>> What got changed here?
>>>
>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>
>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&  Jetty and see if you can reproduce the issue ?
>>
>> Thanks, Sergey
>>>
>>> Thank you and best regards,
>>> Marko
>>>
>>>
>>> -------------------------------------------------------
>>>
>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>
>>>
>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>> Blog: http://sberyozkin.blogspot.com
>>
>>
>> -------------------------------------------------------
>>
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>
>>
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - 
> http://coders.talend.com
>
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 15/08/12 10:29, Voß, Marko wrote:
> Hello Daniel,
>
> I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.
>
> I could not yet figure out, why
>
> if (!isServlet3)
>
> is true for this one service only...
>
Can you please create a war or Maven-based test case that can help us 
reproduce the issue ?

Cheers, Sergey

>
> best regards,
> Marko
>
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, August 13, 2012 6:34 PM
> To: users@cxf.apache.org
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1
>
>
> On Aug 13, 2012, at 4:15 AM, "Voß, Marko"<Ma...@fiz-Karlsruhe.de>  wrote:
>
>> Hello again,
>>
>> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
>>
>> What do I have to change to get this working with Tomcat 6?
>
> I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.
>
>> Maybe we have to upgrade the container to Tomcat 7.
>
> This is definitely what I would suggest.
>
> Dan
>
>
>>
>> Best regards,
>> Marko
>>
>>
>> -----Original Message-----
>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>> Sent: Thursday, August 09, 2012 9:48 PM
>> To: users@cxf.apache.org
>> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after
>> update to CXF 2.6.1
>>
>> Hi Marko
>> On 09/08/12 14:04, Voß, Marko wrote:
>>> Hello,
>>>
>>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>>>
>>> Do you have any idea what could be wrong here? Obviously the code:
>>>
>>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>>>
>>> What got changed here?
>>>
>> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
>>
>> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat&  Jetty and see if you can reproduce the issue ?
>>
>> Thanks, Sergey
>>>
>>> Thank you and best regards,
>>> Marko
>>>
>>>
>>> -------------------------------------------------------
>>>
>>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>>> Geschäftsführerin: Sabine Brünger-Weilandt.
>>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>>
>>>
>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>> Blog: http://sberyozkin.blogspot.com
>>
>>
>> -------------------------------------------------------
>>
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>>
>>
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
>
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>

RE: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Voß, Marko <Ma...@fiz-Karlsruhe.de>.
Hello Daniel,

I tested the application in Tomcat 7 and got the same behavior. It looks like CXF does not recognize the Servlet 3.0 API.

I could not yet figure out, why 

if (!isServlet3)

is true for this one service only...


best regards,
Marko


-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Monday, August 13, 2012 6:34 PM
To: users@cxf.apache.org
Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1


On Aug 13, 2012, at 4:15 AM, "Voß, Marko" <Ma...@fiz-Karlsruhe.de> wrote:

> Hello again,
> 
> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
> 
> What do I have to change to get this working with Tomcat 6?

I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.

> Maybe we have to upgrade the container to Tomcat 7.

This is definitely what I would suggest.

Dan


> 
> Best regards,
> Marko
> 
> 
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
> Sent: Thursday, August 09, 2012 9:48 PM
> To: users@cxf.apache.org
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after 
> update to CXF 2.6.1
> 
> Hi Marko
> On 09/08/12 14:04, Voß, Marko wrote:
>> Hello,
>> 
>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>> 
>> Do you have any idea what could be wrong here? Obviously the code:
>> 
>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>> 
>> What got changed here?
>> 
> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
> 
> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat & Jetty and see if you can reproduce the issue ?
> 
> Thanks, Sergey
>> 
>> Thank you and best regards,
>> Marko
>> 
>> 
>> -------------------------------------------------------
>> 
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>> 
>> 
> 
> 
> --
> Sergey Beryozkin
> 
> Talend Community Coders
> http://coders.talend.com/
> 
> Blog: http://sberyozkin.blogspot.com
> 
> 
> -------------------------------------------------------
> 
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
> Geschäftsführerin: Sabine Brünger-Weilandt. 
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
> 
> 

--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com



-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Daniel Kulp <dk...@apache.org>.
On Aug 13, 2012, at 4:15 AM, "Voß, Marko" <Ma...@fiz-Karlsruhe.de> wrote:

> Hello again,
> 
> Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.
> 
> What do I have to change to get this working with Tomcat 6?

I don't think it should ever have worked.   Strange.   Tomcat 6 doesn't support any of the continuation things.  They should only work with Tomcat 7 or Jetty.

> Maybe we have to upgrade the container to Tomcat 7…

This is definitely what I would suggest.

Dan


> 
> Best regards,
> Marko
> 
> 
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
> Sent: Thursday, August 09, 2012 9:48 PM
> To: users@cxf.apache.org
> Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1
> 
> Hi Marko
> On 09/08/12 14:04, Voß, Marko wrote:
>> Hello,
>> 
>> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>> 
>> Do you have any idea what could be wrong here? Obviously the code:
>> 
>> Bus.getExtension(ContinuationProviderFactory.class) returns null
>> 
>> What got changed here?
>> 
> Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?
> 
> I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat & Jetty and see if you can reproduce the issue ?
> 
> Thanks, Sergey
>> 
>> Thank you and best regards,
>> Marko
>> 
>> 
>> -------------------------------------------------------
>> 
>> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
>> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
>> Geschäftsführerin: Sabine Brünger-Weilandt.
>> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>> 
>> 
> 
> 
> --
> Sergey Beryozkin
> 
> Talend Community Coders
> http://coders.talend.com/
> 
> Blog: http://sberyozkin.blogspot.com
> 
> 
> -------------------------------------------------------
> 
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
> Geschäftsführerin: Sabine Brünger-Weilandt. 
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
> 
> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


RE: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Voß, Marko <Ma...@fiz-Karlsruhe.de>.
Hello again,

Well, we are using Tomcat 6 and have the Apache Geronimo Spec (geronimo-servlet_3.0_spec) included as a dependency. I know that Tomcat 6 does support the Servlet API 2.5 only but everything did work until then. It is only this one service, which does not work.

What do I have to change to get this working with Tomcat 6?

Maybe we have to upgrade the container to Tomcat 7...

Best regards,
Marko


-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Thursday, August 09, 2012 9:48 PM
To: users@cxf.apache.org
Subject: Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Hi Marko
On 09/08/12 14:04, Voß, Marko wrote:
> Hello,
>
> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>
> Do you have any idea what could be wrong here? Obviously the code:
>
> Bus.getExtension(ContinuationProviderFactory.class) returns null
>
> What got changed here?
>
Perhaps it is actually to do with the current servlet container providing Servlet3 API is opposed to say Jetty-specific implementation ?

I believe Dan has made a server side JAX-WS async support depend on continuations, so it should work. Can you please try a jaxws_async demo on both Tomcat & Jetty and see if you can reproduce the issue ?

Thanks, Sergey
>
> Thank you and best regards,
> Marko
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



Re: AbstractHTTPDestination.cproviderFactory is null after update to CXF 2.6.1

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Marko
On 09/08/12 14:04, Voß, Marko wrote:
> Hello,
>
> After updating from CXF 2.5.1 to 2.6.1 the AbstractHTTPDestination.cproviderFactory is null in some cases I am not able to specify in any detail.
>
> Do you have any idea what could be wrong here? Obviously the code:
>
> Bus.getExtension(ContinuationProviderFactory.class) returns null
>
> What got changed here?
>
Perhaps it is actually to do with the current servlet container 
providing Servlet3 API is opposed to say Jetty-specific implementation ?

I believe Dan has made a server side JAX-WS async support depend on 
continuations, so it should work. Can you please try a jaxws_async demo 
on both Tomcat & Jetty and see if you can reproduce the issue ?

Thanks, Sergey
>
> Thank you and best regards,
> Marko
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com