[
http://jira.jboss.com/jira/browse/JBSEAM-3052?page=comments#action_12415036 ]
Peter Maedel commented on JBSEAM-3052:
--------------------------------------
I just dealt with another of these Exceptions which real cause was a null pointer.
Anyway I was able to determine the location of the exception being swallowed:
RollbackInterceptor : 41
package org.jboss.seam.transaction;
/**
* Automatically sets the current transaction to rollback
* only when an exception is thrown.
*
* @author Gavin King
*/
@Interceptor(stateless=true)
public class RollbackInterceptor extends AbstractInterceptor
{
private static final long serialVersionUID = 5551801508325093417L;
@AroundInvoke
public Object aroundInvoke(InvocationContext invocation) throws Exception
{
try
{
return invocation.proceed();
}
catch (Exception e)
{
if ( isRollbackRequired(e) )
{
try
{
Transaction.instance().setRollbackOnly();
}
catch (Exception te) {} //swallow
}
throw e;
}
}
Catch & Print (RunTime)Exceptions that get produced within Seam
LifeCycle
-------------------------------------------------------------------------
Key: JBSEAM-3052
URL:
http://jira.jboss.com/jira/browse/JBSEAM-3052
Project: Seam
Issue Type: Feature Request
Components: Exception Handling
Affects Versions: 2.0.2.GA
Environment: JBoss AS 4.2.2
Seam 2.0.2
Reporter: Peter Maedel
Lots of people have been dealing with the issue of overwritten exceptions:
http://www.seamframework.org/Community/ConnectionProblem
http://www.seamframework.org/Community/TransactionIsNotActiveWithCreateAn...
Although in some cases this behaviour is part of EJB specification (EJB Container
overwriting Exception) I am unsure if there isnt a possibility within Seam to print
exceptions when they occure rather than have them overwritten with useless junk (cannot
open connection, transaction is abort_only) later on.
If you want to reproduce try opening a page that references a bean with this @create
method:
@Create
public void iCrash(){
new File("nonExistentDirectory").listFiles();
}
Subsequent calls which involve Transactions (either in @create method or referenced
beans) will result in the obscure "Transaction is abort_only" exception, leaving
no trace which could lead to the actual cause of the failure.
Honestly this behaviour has been a horrible waste of time so far!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira