[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3052) Catch & Print (RunTime)Exceptions that get produced within Seam LifeCycle
Julien Kronegg (JIRA)
jira-events at lists.jboss.org
Mon Aug 4 19:01:56 EDT 2008
[ https://jira.jboss.org/jira/browse/JBSEAM-3052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12423563#action_12423563 ]
Julien Kronegg commented on JBSEAM-3052:
----------------------------------------
I had the same problem (apparent "no active Transaction" caused by an swallowed exception).
Thanks to Peter's work, I made the following changes:
1. took RollbackInterceptor seam source code, added a "e.printStackTrace();" just before the "throw e;"
2. recompiled it using "javac -classpath ;./jboss-seam.jar;jta.jar RollbackInterceptor.java"
3. repackaged jboss-seam.jar (using 7zip) and replaced my project's lib of the same name
4. restarted the application server (Jboss AS 4.2.1.GA)
I got the swallowed cause (which was in my application code as said in referenced threads), corrected the problem and my application makes no more "no active Transaction" exceptions.
It's a really dirty workaround I must say, but I found it to be very quick.
> Catch & Print (RunTime)Exceptions that get produced within Seam LifeCycle
> -------------------------------------------------------------------------
>
> Key: JBSEAM-3052
> URL: https://jira.jboss.org/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/TransactionIsNotActiveWithCreateAnnotation
> 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list