[
https://jira.jboss.org/jira/browse/JBSEAM-4435?page=com.atlassian.jira.pl...
]
Elmar Weber updated JBSEAM-4435:
--------------------------------
Description:
When a Seam managed resource produces an exception the exception is swallowed, i.e. it is
not logged. Furthermore, maybe this is also the source of the problem, the failed request
is not redirected to the correct debug.seam URL.
Steps to reproduce on JBoss 5.1.0.GA with Seam 2.2.0.GA:
1. create a Seam resource that produces an exception (code attached)
2. navigate to the Seam resource: /seam/resource/myresource
Now instead of redirecting to /debug.seam?cid=<CID> the browser redirects to
/seam/resource/debug.xhtml?cid=<CID> which of course does not exist, thus resulting
in a 403 HTTP error.
Furthermore the exception is not logged in the JBoss logs.
When you manually navigate to /debug.seam?cid=<CID> the full exception trace is
shown (serves also as a workaround).
Example resource (requires existence of resource servlet in web.xml) is attached.
was:
When a Seam managed resource produces an exception the exception is swallowed, i.e. it is
not logged. Furthermore, maybe this is also the source of the problem, the failed request
is not redirected to the correct debug.seam URL.
Steps to reproduce on JBoss 5.1.0.GA with Seam 2.2.0.GA:
1. create a Seam resource that produces an exception (code at the end)
2. navigate to the Seam resource: /seam/resource/myresource
Now instead of redirecting to /debug.seam?cid=<CID> the browser redirects to
/seam/resource/debug.xhtml?cid=<CID> which of course does not exist, thus resulting
in a 403 HTTP error.
Furthermore the exception is not logged in the JBoss logs.
When you manually navigate to /debug.seam?cid=<CID> the full exception trace is
shown (serves also as a workaround).
Example resource (requires existence of resource servlet in web.xml):
@Scope(ScopeType.APPLICATION)
@Name("myResource")
@BypassInterceptors
public class SimpleExceptionResource extends AbstractResource {
@Override
public String getResourcePath() {
return "/myresource";
}
@Override
public void getResource(final HttpServletRequest request,
final HttpServletResponse response) throws ServletException,
IOException {
new ContextualHttpServletRequest(request) {
@Override
public void process() throws IOException {
doWork(request, response);
}
}.run();
}
private void doWork(HttpServletRequest request, HttpServletResponse response)
throws IOException {
response.getOutputStream().print("" + 0 / 0);
}
}
Exception in Seam Resource is Swallowed and Redirection to debug.seam
Does not Work
-----------------------------------------------------------------------------------
Key: JBSEAM-4435
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4435
Project: Seam
Issue Type: Bug
Affects Versions: 2.2.0.GA
Environment: Linux, JBoss 5.1.0.GA
Reporter: Elmar Weber
Priority: Minor
Attachments: SimpleExceptionResource.java
When a Seam managed resource produces an exception the exception is swallowed, i.e. it is
not logged. Furthermore, maybe this is also the source of the problem, the failed request
is not redirected to the correct debug.seam URL.
Steps to reproduce on JBoss 5.1.0.GA with Seam 2.2.0.GA:
1. create a Seam resource that produces an exception (code attached)
2. navigate to the Seam resource: /seam/resource/myresource
Now instead of redirecting to /debug.seam?cid=<CID> the browser redirects to
/seam/resource/debug.xhtml?cid=<CID> which of course does not exist, thus resulting
in a 403 HTTP error.
Furthermore the exception is not logged in the JBoss logs.
When you manually navigate to /debug.seam?cid=<CID> the full exception trace is
shown (serves also as a workaround).
Example resource (requires existence of resource servlet in web.xml) is attached.
--
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