----- Original Message -----
From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
To: "Tomas Remes" <tremes(a)redhat.com>
Cc: "Jozef Hartinger" <jharting(a)redhat.com>, cdi-tck(a)lists.jboss.org
Sent: Monday, January 5, 2015 11:09:30 AM
Subject: Re: [cdi-dev]
org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown
and exception handling
well I really dont know. For me TCK works cause of the impl. Said
otherwise the exception should be thrown before the filter chain IMO
since it should be valid for the whole request ie before the
OutermostFilter filter.
I think the spec doesn't exactly state, when the exception should be thrown. We have
only:
"If the propagated conversation cannot be restored, the container must associate
the request with a new transient conversation and throw an exception of type
javax.enterprise.context.NonexistentConversationException ."
I guess in Weld it's thrown during the filter chain.
I can fix it sort term pretty easily but would be great to know if
some scope are not available in some filters
2015-01-05 11:00 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>
> I looked at org.apache.webbeans.jsf.WebBeansPhaseListener and you check conversation
propagation before JSF restore view phase and also throw NonexistentConversationException.
I guess this exception is then wrapped to FacesException during any following phase.
> I think this is not TCK test issue, because the
org.jboss.cdi.tck.tests.context.conversation.OutermostFilter should really get
NonexistentConversationException and not FacesException.
>
> Tom
>
> ----- Original Message -----
> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
> To: "Tomas Remes" <tremes(a)redhat.com>
> Cc: "Jozef Hartinger" <jharting(a)redhat.com>, cdi-tck(a)lists.jboss.org
> Sent: Friday, January 2, 2015 5:06:41 PM
> Subject: Re: [cdi-dev]
org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown
and exception handling
>
> org.apache.webbeans.jsf.WebBeansPhaseListener#beforePhase
>
>
>
>
> 2015-01-02 17:02 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>>
>> Where exactly is the NonexistentConversationException thrown in your case?
>>
>> ----- Original Message -----
>> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
>> To: "Tomas Remes" <tremes(a)redhat.com>
>> Cc: "Jozef Hartinger" <jharting(a)redhat.com>,
cdi-tck(a)lists.jboss.org
>> Sent: Friday, January 2, 2015 4:37:28 PM
>> Subject: Re: [cdi-dev]
org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown
and exception handling
>>
>> NonexistentConversationException is the cause of FacesException (why 500 is set)
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>>
http://www.tomitribe.com
>>
http://rmannibucau.wordpress.com
>>
https://github.com/rmannibucau
>>
>>
>> 2015-01-02 16:29 GMT+01:00 Tomas Remes <tremes(a)redhat.com>:
>>>
>>> I am not sure I'm following here. There shouldn't be any 500 response
code (and thus no need for client.setThrowExceptionOnFailingStatusCode(false)) from what I
can see. The exception is handled and the response code is still 200. Can you post your
stacktrace?
>>>
>>> Thank's
>>> Tom
>>>
>>> ----- Original Message -----
>>> From: "Romain Manni-Bucau" <rmannibucau(a)gmail.com>
>>> To: "Jozef Hartinger" <jharting(a)redhat.com>
>>> Cc: cdi-dev(a)lists.jboss.org
>>> Sent: Friday, January 2, 2015 9:37:25 AM
>>> Subject: Re: [cdi-dev]
org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown
and exception handling
>>>
>>> Cause JSF layer set response code to 500
>>>
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau
>>>
http://www.tomitribe.com
>>>
http://rmannibucau.wordpress.com
>>>
https://github.com/rmannibucau
>>>
>>>
>>> 2015-01-02 9:15 GMT+01:00 Jozef Hartinger <jharting(a)redhat.com>:
>>>> If the exception is handled why is then status set to 500?
>>>>
>>>>
>>>> On 12/24/2014 06:57 PM, Romain Manni-Bucau wrote:
>>>>>
>>>>> there is a NonexistentConversationException (sorry dont have the
exact
>>>>> name right now). It is what is expected then the outermostfilter
write
>>>>> few things in the response but it is "too late" status is
500. All
>>>>> other tests relying on the same thing do the set to avoid the
>>>>> exception but not this one.
>>>>>
>>>>>
>>>>> Romain Manni-Bucau
>>>>> @rmannibucau
>>>>>
http://www.tomitribe.com
>>>>>
http://rmannibucau.wordpress.com
>>>>>
https://github.com/rmannibucau
>>>>>
>>>>>
>>>>> 2014-12-24 18:39 GMT+01:00 John D. Ament
<john.d.ament(a)gmail.com>:
>>>>>>
>>>>>> Why is the http client throwing an exception? AFAIK http client
is just
>>>>>> making requests and generating the responding response as string
or
>>>>>> otherwise. html unit is trying to then convert it to a page to
process
>>>>>> the
>>>>>> content.
>>>>>>
>>>>>> On Wed Dec 24 2014 at 12:14:15 PM Romain Manni-Bucau
>>>>>> <rmannibucau(a)gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> isnt
"client.setThrowExceptionOnFailingStatusCode(false);" missing in
>>>>>>>
>>>>>>>
>>>>>>>
org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest#testNonexistentConversationExceptionThrown?
>>>>>>>
>>>>>>> Cause it expects an exception but by default httpclient will
throw an
>>>>>>> exception before any validation is done
>>>>>>>
>>>>>>> what do I miss?
>>>>>>>
>>>>>>> Romain Manni-Bucau
>>>>>>> @rmannibucau
>>>>>>>
http://www.tomitribe.com
>>>>>>>
http://rmannibucau.wordpress.com
>>>>>>>
https://github.com/rmannibucau
>>>>>>> _______________________________________________
>>>>>>> cdi-dev mailing list
>>>>>>> cdi-dev(a)lists.jboss.org
>>>>>>>
https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>>>>>
>>>>>>> Note that for all code provided on this list, the provider
licenses the
>>>>>>> code under the Apache License, Version 2
>>>>>>> (
http://www.apache.org/licenses/LICENSE-2.0.html). For all
other ideas
>>>>>>> provided on this list, the provider waives all patent and
other
>>>>>>> intellectual
>>>>>>> property rights inherent in such information.
>>>>>
>>>>> _______________________________________________
>>>>> cdi-dev mailing list
>>>>> cdi-dev(a)lists.jboss.org
>>>>>
https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>>>
>>>>> Note that for all code provided on this list, the provider licenses
the
>>>>> code under the Apache License, Version 2
>>>>> (
http://www.apache.org/licenses/LICENSE-2.0.html). For all other
ideas
>>>>> provided on this list, the provider waives all patent and other
intellectual
>>>>> property rights inherent in such information.
>>>>
>>>>
>>> _______________________________________________
>>> cdi-dev mailing list
>>> cdi-dev(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/cdi-dev
>>>
>>> Note that for all code provided on this list, the provider licenses the code
under the Apache License, Version 2 (
http://www.apache.org/licenses/LICENSE-2.0.html). For
all other ideas provided on this list, the provider waives all patent and other
intellectual property rights inherent in such information.
>>>
>>> --
>>> Tomas Remes
>>>
>>
>> --
>> Tomas Remes
>>
>
> --
> Tomas Remes
>
--
Tomas Remes