8 Replies Latest reply on Mar 2, 2009 4:18 PM by jkronegg

    WebSphere v7.0: Problem with @ApplicationException


      WebSphere v 7.0 (JEE5,JDK 1.6) GA is planned for friday Sept, 26
      In the meantime, I'm trying to run a simple seam 2.0.2SP1 app on WebSphere v7.0 beta, and I receive many exceptions on startup stating that @ApplicationException may only be applied to classes that subclass java.lang.Exception or java.lang.Error (see the logs below)

      For example, this occurs for the NotLoggedInException class that extends RuntimeException


      • is this a seam bug?

      • is this a WebSphere bug (if so, i will report it to IBM) ?

      • has someone already meet this problem?

      • is there a workaround to this?


       wtp  E org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EJBJarFileImpl processAnnotations Annotations scanning of EJB JAR [ jboss-seam.jar ] completed with errors.
      wtp  E org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EJBJarFileImpl processAnnotations Annotations error:
                                       com.ibm.wsspi.amm.validate.ValidationException: @ApplicationException may only be applied to classes that subclass java.lang.Exception or java.lang.Error, class [ org.jboss.seam.security.NotLoggedInException ]
           at com.ibm.ws.amm.validate.ejb.ApplicationExceptionValidator.validate(ApplicationExceptionValidator.java:62)

        • 1. Re: WebSphere v7.0: Problem with @ApplicationException

          The problem is not present in RSA v7.5 GA and WAS v7.0 GA

          Seam 2.0.3, RF 3.2.2 + faclets + jpa + hibernate 3.2.6 runs fine with WAS v7.0 GA (With the JSF implementation of WAS, ie JSF_RI 1.2)


          • 2. Re: WebSphere v7.0: Problem with @ApplicationException

            Hi Denis,
            I have my Seam 2.0.1 application running on WAS Now planning to migrate to WAS 7.

            I downloaded Seam 2.0.3, RF 3.2.2.GA, hibernate core 3.2.6.GA and replaced the corresponding jars and deleted the jars jsf-api.ja, jsf-impl.jar, el-api.jar and el-ri.jar

            I could able to deploy the application successfuly without any exceptions. When I tried to access the index.html I get the following log statement (in the Sysout.log file) and the application hungs

            [11/25/08 23:58:16:562 IST] 00000037 CacheManager  I org.ajax4jsf.cache.CacheManager getCacheFactory Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory

            After sometime, I get the following exception(systemOut.log)

            [11/26/08 0:09:22:312 IST] 00000015 ThreadMonitor W   WSVR0605W: Thread "WebContainer : 0" (00000037) has been active for 665984 milliseconds and may be hung.  There is/are 1 thread(s) in total in the server that may be hung.
                    at org.ajax4jsf.cache.ServletContextInitMap$1.size(ServletContextInitMap.java:77)
                    at java.util.AbstractMap.size(Unknown Source)
                    at java.util.AbstractMap.isEmpty(Unknown Source)
                    at java.util.AbstractMap.toString(Unknown Source)
                    at java.lang.String.valueOf(String.java:1511)
                    at java.lang.StringBuilder.append(StringBuilder.java:191)
                    at org.ajax4jsf.cache.LRUMapCacheFactory.createCache(LRUMapCacheFactory.java:44)
                    at org.ajax4jsf.resource.InternetResourceService.init(InternetResourceService.java:107)
                    at org.ajax4jsf.webapp.BaseFilter.init(BaseFilter.java:188)
                    at org.jboss.seam.web.Ajax4jsfFilter.init(Ajax4jsfFilter.java:86)
                    at org.jboss.seam.servlet.SeamFilter.init(SeamFilter.java:97)
                    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:140)

            Following is the environment details (from the systemOut.log)

            WebSphere Platform [BASE r0834.28][WEB2FEP web20835.6] running with process name <hostName>\server1 and process id 4324
            org.hibernate.cfg.annotations.Version <clinit> Hibernate Annotations 3.3.0.GA
            org.hibernate.cfg.Environment <clinit> Hibernate 3.2.6
            org.hibernate.cfg.Environment buildBytecodeProvider Bytecode provider name : cglib
            org.hibernate.ejb.Version <clinit> Hibernate EntityManager 3.3.1.GA
            org.hibernate.dialect.Dialect <init> Using dialect: org.hibernate.dialect.DB2400Dialect
            Sun's JavaServer Faces implementation (1.2_07-b03-FCS)

            Please let me know if I need to do any steps I am missing here

            • 3. Re: WebSphere v7.0: Problem with @ApplicationException

              thread dump shows

              3XMTHREADINFO      "WebContainer : 1" TID:0x1564BE00, j9thread_t:0x152EAF90, state:CW, prio=5
              3XMTHREADINFO1            (native thread ID:0x1024, native priority:0x5, native policy:UNKNOWN)
              4XESTACKTRACE          at org/ajax4jsf/cache/ServletContextInitMap$1.size(ServletContextInitMap.java:77(Compiled Code))
              4XESTACKTRACE          at java/util/AbstractMap.size(Bytecode PC:6)
              4XESTACKTRACE          at java/util/AbstractMap.isEmpty(Bytecode PC:1)
              4XESTACKTRACE          at java/util/AbstractMap.toString(Bytecode PC:1)
              4XESTACKTRACE          at java/lang/String.valueOf(String.java:1511(Compiled Code))
              4XESTACKTRACE          at java/lang/StringBuilder.append(StringBuilder.java:191(Compiled Code))
              4XESTACKTRACE          at org/ajax4jsf/cache/LRUMapCacheFactory.createCache(LRUMapCacheFactory.java:44) 

              • 4. Re: WebSphere v7.0: Problem with @ApplicationException


                Your problem is not at all related to the @AsynchronousException annotation as the title of this thread is about

                Anyway, your problem is due to a bug in RF 3.2.0.SP1 (Infinite loop) that is corrected in RF 3.3.0
                You have to patch class ServletContextInitMap in RF
                See here : RF-4537

                ..and for the @AsynchronousException annotation bug, I opened a PMR at IBM, the corrected the problem and they provided me a patch (iFix) that will be included in WAS v7.0.0.3

                • 5. Re: WebSphere v7.0: Problem with @ApplicationException

                  Hi Denis,
                  Thanks for your reply.

                  I am not sure why the RF Bug only in WAS 7 not in WAS Though I do not have any configuration to enable-cache. So my guess, this code seems to be triggering only in WAS 7.

                  I posted my comments in this thread after seeing your comments saying Got Seam working on WAS 7. So wanted to check with you if I missed some steps..

                  After knowing information about the RF bug, I could able to get my app working on WAS 7.0. I did not face any @ApplicationException issue.

                  Thank you very much for your time and reply.

                  • 6. Re: WebSphere v7.0: Problem with @ApplicationException

                    For the LRUMapCacheFactory's infinite loop: Richfaces version issue, see JBSEAM-3750

                    • 7. Re: WebSphere v7.0: Problem with @ApplicationException

                      For the @ApplicationException issue: yes, it's an IBM issue, see IBM - PK74419

                      • 8. Re: WebSphere v7.0: Problem with @ApplicationException

                        For the @ApplicationException issue, we obtained the ifix from IBM which solved the problem. We now ran into JBSEAM-3726. It seems that we are following Denis Forveille's path... ;-)