[
https://jira.jboss.org/jira/browse/JBSEAM-4277?page=com.atlassian.jira.pl...
]
Matthew Lieder updated JBSEAM-4277:
-----------------------------------
Attachment: SeamTestcase.zip
Here's a test case that easily reproduces the problem. Open up index.seam in your
browser and click the link to watch the black magic happen.
Bad handling of missing natural conversation ID
-----------------------------------------------
Key: JBSEAM-4277
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4277
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.2.GA
Reporter: Matthew Lieder
Attachments: SeamTestcase.zip
Say you have the following setup in pages.xml:
<conversation name="mycid" parameter-name="mycid"
parameter-value="#{null}" />
<page view-id="/example.xhtml" conversation="mycid">
<begin-conversation join="true" />
</page>
<exception>
<end-conversation/>
<redirect view-id="/error.xhtml">
<message
severity="error">#{org.jboss.seam.handledException}</message>
</redirect>
</exception>
The problem is that if you open example.seam without the mycid query param, that page
still tries to render (succeeding if it has nothing requiring conversation state) and a
lot of "No active conversation context" and "conversation id evaluated to
null: mycid" messages appear in the logs.
Expected behavior is that the error.xhtml should be displayed, showing the
"conversation id evaluated to null: mycid" message.
The problem seems to be that the error handler calls Manager.redirect to display
error.xhtml, which would work except that it tries to encode the conversation ID onto the
page request which ends up throwing that error again and shortcircuiting the redirect. At
that point the render continues as if the original exception never occurred, though
it's completely missing all conversation state and thus all sorts of weird things can
happen then.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira