1 2 Previous Next 28 Replies Latest reply on May 25, 2006 6:25 AM by gavin.king Go to original post
      • 15. Re: SeamExtendedManagedPersistencePhaseListener
        gavin.king

        Yes I mean SeamExceptionFilter, my bad.

        • 16. Re: SeamExtendedManagedPersistencePhaseListener
          rdewell

           

          Right, but SEMPPL does tx management. In fact, that is *all* it does. If you want to do your own tx management, you don't need it.


          As I read his thread, he did stop using SEMPPL and switched to the regular SeamPhaseListener + custom TX management because he could not resolve the exception. He was never simultaneously using SEMPPL + custom TX management.

          The only problem here is the known bug where EJB3 and Hibernate try to register synchronizations on a tx marked for rollback.


          So is it possible that the actual reason for the rollback is being swallowed up by EJB3 trying to register synchronizations?

          From what I can (finally) tell, I have a Session scoped SFSB that is throwing an exception in a method (not so unusual!). This exception causes the SFSB to be removed by/from the container, which in turn causes it to be removed from Seam. Instead of hearing about the ACTUAL exception, however, I just hear about this damn transaction already rolledback trace. To get any useful information out of this I'm going to have to intercept all of my methods and print stack traces my self. This is a debugging nightmare.




          • 17. Re: SeamExtendedManagedPersistencePhaseListener
            g.tomassoni

             

            As I read his thread, he did stop using SEMPPL and switched to the regular SeamPhaseListener + custom TX management because he could not resolve the exception. He was never simultaneously using SEMPPL + custom TX management.


            Right.

            • 18. Re: SeamExtendedManagedPersistencePhaseListener
              bill.burke

               


              ... so there is no way that setRollbackOnly() is ever called w/o an exception propagation. So unless either the application or JSF is swallowing exceptions, there _is_ an exception.


              If the transaction times out, it will be marked for rollback by another thread and interrupted.

              Bill


              • 19. Re: SeamExtendedManagedPersistencePhaseListener
                gavin.king

                 

                So is it possible that the actual reason for the rollback is being swallowed up by EJB3 trying to register synchronizations?


                Exactly. I thought I had already made that bit clear in this or another thread.

                From what I can (finally) tell, I have a Session scoped SFSB that is throwing an exception in a method (not so unusual!). This exception causes the SFSB to be removed by/from the container, which in turn causes it to be removed from Seam.


                Exactly, all according to spec. In addition, the tx gets marked for rollback, again according to spec.

                Instead of hearing about the ACTUAL exception, however, I just hear about this damn transaction already rolledback trace. To get any useful information out of this I'm going to have to intercept all of my methods and print stack traces my self. This is a debugging nightmare.


                Yes and this is a bug, as I have stated numerously in this and other threads. Unfortunately, getting a bug fixed in both EJB3 and HEM, rolling into an AS release, and finally rolling into a Seam release is _not_ something that can be done in a couple of days.


                • 20. Re: SeamExtendedManagedPersistencePhaseListener
                  rdewell

                  It wasn't clear to me that the "synchronization exception" is responsible for swallowing up other exception causes. In a post in this same thread it was said that "either the application or JSF is swallowing exceptions", which doesn't appear to be the case at all.

                  Is this exception masking considered under EJBTHREE-540 then?

                  • 21. Re: SeamExtendedManagedPersistencePhaseListener
                    pbrewer_uk

                    This, to me, is a bit of a show-stopper. I've just spent the 4 hours trying to track down the cause of a RollbackException and eventually discovered that it was due to annotating a variable with @Out and @DataModel.

                    Is there any progress/updates/fixes on the hiding of actual exceptions?

                    What is the JIRA issue logged under (AFAICT it doesn't look like http://jira.jboss.com/jira/browse/EJBTHREE-540)?

                    • 22. Re: SeamExtendedManagedPersistencePhaseListener
                      pmuir

                      It's fixed (for me at least) in JBoss 4.0.4GA / Seam 1.0.0CR3 (which is a huge relief!)

                      • 23. Re: SeamExtendedManagedPersistencePhaseListener
                        pbrewer_uk

                        Unfortunately, I've just upgraded to CR3 (embedded-ejb with tomcat) and reinstated my original error and the stack traces are still hiding the point of failure.

                        Perhaps an @Out(scope=ScopeType.CONVERSATION) and a @DataModel annotation on the same field is just too much of a strange thing to do. But at least a clue would have been good!

                        • 24. Re: SeamExtendedManagedPersistencePhaseListener
                          gavin.king

                          Put a breakpoint in Component.inject() or Component.outject() and find out what the actual underlying exception is.

                          C'mon guys, the debugger is your friend!

                          • 25. Re: SeamExtendedManagedPersistencePhaseListener
                            g.tomassoni

                            Well, SEMPPL seems work fine to me in JBoss 4.0.4GA + Seam 20060520 + jsf-facelets 1.1.4.

                            It has still a drawback, anyway: when an exception occurs in a page, it "leaks" the serving transaction which is left active in the thread and may eventually be propagated to other servlets.

                            For the very same reason, an exception in a page may led to a unusable application: the user often can't just "avoid" the wrong page and do something else.

                            Do you experience the same?

                            • 26. Re: SeamExtendedManagedPersistencePhaseListener
                              pbrewer_uk

                              Cheers Gavin, I shall add that to my list of breakpoints to investigate when things go strange!

                              g.tomassoni wrote

                              Do you experience the same?

                              I do sometimes experience an exception that brings down the whole servlet - requiring a tomcat reboot. So far these (infrequent) exceptions have occurred because I've done something completely wrong. I have no idea why the whole servlet crashes though (even though the SeamExceptionFilter is enabled).

                              • 27. Re: SeamExtendedManagedPersistencePhaseListener
                                g.tomassoni

                                 

                                "pbrewer_uk" wrote:
                                I do sometimes experience an exception that brings down the whole servlet


                                I think this is not the same problem I'm experiencing: I get errors caused by transactions already active after the first exception.

                                Please note that the first exception is due to a software mistake and its throwing is correct. Just, after it I get an barely useless app with SEMPPL. Probably, waiting for the transaction to timeout would help, but this is far from optimal in a web env...

                                • 28. Re: SeamExtendedManagedPersistencePhaseListener
                                  gavin.king

                                   

                                  "g.tomassoni" wrote:
                                  It has still a drawback, anyway: when an exception occurs in a page, it "leaks" the serving transaction which is left active in the thread and may eventually be propagated to other servlets.



                                  This should not be possible if you have SeamExceptionFilter.


                                  By the way, it should actually not be possible at all. There is a bug in JBoss:

                                  http://jira.jboss.com/jira/browse/JBAS-3242

                                  1 2 Previous Next