3 Replies Latest reply on Mar 10, 2008 5:08 AM by Gavin King

    Seam 2 JEE5 compliant with the TCK requirements?

    Burt Prior Newbie

      Hi Seam Team,


      Our team has is experiencing a very interesting condition with Seam 2 that we would very much like your help and input on.


      We have successfully built, deployed, and are running the Seam 2.1.0.A1 JEE5 'Booking' application on Geronimo 2.1.


      As we 'exercise' the booking application, at certain points in the business logic we get the following error:


      ...
      11:25:05,179 ERROR OpenEJB The bean instance business method encountered a system exception: Callback methods cannot access parameters
      java.lang.IllegalStateException: Callback methods cannot access parameters
      ...


      The 'Booking' application generates the same error (please see the stack trace below), then recovers.  The application appears to continue to work until another business logic action (session bean) is performed, then


      recovers again. 


      All the business logic in the 'Booking' app appears to work, but is filling up the logs with the same error.


      We have studied the Geronimo logs in real time, while executing the 'Booking' app.


      It appears that running the app on the geronimo/openejb javaee5 certified container results in the stack trace and that allowing the InvocationContext to supply the parameters during a lifecycle call results in tck failures.


      The following code from 'BookingLIstAction' and 'HotelSearchingAction' appears to be the source of the problem:


      ...
      @Destroy @Remove
      public void destroy()  {}
      ...



      Could I ask for your help in the following questions and in solving this error?  The stack trace follows.



      Question 1: 
      Is it possible to run the 'Booking' app with the @Destroy method getting called on a certified container without getting an exception?


      Question 2:
      Can I safely just take out the @Destroy annotation on destroy()?  I don't think the Geronimo engineers are aware of any support in the spec for this requirement.



      Stack trace follows:


      11:25:05,179 ERROR [OpenEJB] The bean instance business method encountered a system exception: Callback methods cannot access parameters
      java.lang.IllegalStateException: Callback methods cannot access parameters
           at org.apache.openejb.core.interceptor.ReflectionInvocationContext.getParameters(ReflectionInvocationContext.java:71)
           at org.jboss.seam.intercept.EJBInvocationContext.getParameters(EJBInvocationContext.java:34)
           at org.jboss.seam.intercept.SeamInvocationContext.getParameters(SeamInvocationContext.java:49)
           at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:33)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
           at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
           at sun.reflect.GeneratedMethodAccessor144.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:146)
           at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:129)
           at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
           at org.apache.openejb.core.stateful.StatefulContainer._invoke(StatefulContainer.java:428)
           at org.apache.openejb.core.stateful.StatefulContainer.removeEJBObject(StatefulContainer.java:332)
           at org.apache.openejb.core.stateful.StatefulContainer.invoke(StatefulContainer.java:244)
           at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
           at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
           at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
           at org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
           at $Proxy76.destroy(Unknown Source)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
           at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
           at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
           at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
           at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
           at org.javassist.tmp.java.lang.Object_$$_javassist_4.destroy(Object_$$_javassist_4.java)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
           at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
           at org.jboss.seam.Component.callComponentMethod(Component.java:2084)
           at org.jboss.seam.Component.callDestroyMethod(Component.java:2015)
           at org.jboss.seam.Component.destroy(Component.java:1331)
           at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:251)
           at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:249)
           at org.jboss.seam.contexts.ServletLifecycle.endSession(ServletLifecycle.java:129)
           at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:49)
           at org.mortbay.jetty.servlet.AbstractSessionManager.removeSession(AbstractSessionManager.java:665)
           at org.mortbay.jetty.servlet.AbstractSessionManager$Session.invalidate(AbstractSessionManager.java:938)
           at org.mortbay.jetty.servlet.HashSessionManager$Session.invalidate(HashSessionManager.java:493)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.jboss.seam.contexts.FacesLifecycle.invalidateSession(FacesLifecycle.java:141)
           at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:118)
           at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:515)
           at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:247)
           at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:194)
           at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:92)
           at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:142)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
           at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
           at org.apache.geronimo.jetty6.InternalJettyServletHolder.handle(InternalJettyServletHolder.java:65)
           at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
           at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
           at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
           at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
           at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
           at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
           at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.access$101(TwistyWebAppContext.java:40)
           at org.apache.geronimo.jetty6.handler.TwistyWebAppContext$TwistyHandler.handle(TwistyWebAppContext.java:65)
           at org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.handle(ThreadClassloaderHandler.java:46)
           at org.apache.geronimo.jetty6.handler.InstanceContextHandler.handle(InstanceContextHandler.java:58)
           at org.apache.geronimo.jetty6.handler.UserTransactionHandler.handle(UserTransactionHandler.java:48)
           at org.apache.geronimo.jetty6.handler.ComponentContextHandler.handle(ComponentContextHandler.java:47)
           at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.handle(TwistyWebAppContext.java:59)
           at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
           at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
           at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
           at org.mortbay.jetty.Server.handle(Server.java:324)
           at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
           at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
           at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
           at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
           at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
           at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
           at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:214)
           at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:344)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
      
      



      Thank you very much for your help in this.
      .Burt
       

        • 1. Re: Seam 2 JEE5 compliant with the TCK requirements?
          Gavin King Master

          Interesting one. Not sure who is right and who is wrong, but please create a bug report in JIRA and we will investigate. Problem is quite likely on our side...

          • 2. Re: Seam 2 JEE5 compliant with the TCK requirements?
            Burt Prior Newbie

            Hi Gavin,


            Thank you for responding personally to my post.  I was hoping that you would find this issue interesting.  We sure did.


            I have created a new bug report (http://jira.jboss.com/jira/browse/JBSEAM-2713) on this issue as you suggested.


            A couple of sentences on how we got here.


            After learning about Seam, we were so impressed that our team started building the first Seam/Hibernate JPA/EJB3/JSF(facelets)/Oracle application at our large enterprise.


            Our team is currently building a 'showcase' Seam app, because we think Seam is the best framework for jEE5, period.


            We have experienced some 'challenges' in putting all the pieces of our application together using the architecture mentioned above.


            After working thru all the issues, this error caught us by surprise, and appears to be the last issue to solve before going to beta with our Seam app.


            Before posting, we really tried to do our homework and understand and work thru the errors we we seeing.



            With respect to your team's bug prioritization, I was wondering if you had an idea of when you would have time to investigate this issue?


            We would be very happy with any 'snapshot' or 'patch' release that we could use as soon as possible.


            If a 'patch' does become available, is there a notification of it's release by your team?



            Thanks again for your help, and your work on Seam.
            .Burt   

            • 3. Re: Seam 2 JEE5 compliant with the TCK requirements?
              Gavin King Master

              We will take a look. However, your stack trace looks like what is happening is that we are calling getParameters() from an @AroundInvoke interceptor on a @Remove method. This is not a lifecycle callback! A lifecycle callback would be a @PreDestroy interceptor.


              If that is correct, it seems to be a bug in Geronimo, not in Seam. (Yeah, it may also be a TCK bug, but Geronimo should comply with the spec, not with the TCK.) However, from the stack trace only, I can't be sure that it is 100% correct.