7 Replies Latest reply on Feb 4, 2008 9:15 AM by gayatri.ramamurthi

    Seam Exceptions during load testing

    gayatri.ramamurthi

      We have an application developed in Seam, and its well tested and about to be deployed to production.

      But we are facing a problem, mainly encountered during load testing. The exception that we get is pasted below.
      The app works perfectly fine otherwise, the only problem being slow response time due to some web- service calls.

      I would like if anyone can help me with this problem.

      - gayatri

      ---------------------------------------------------------------------------------------------

      17 Jan 2008 14:06:45,557 ERROR [SeamPhaseListener] uncaught exception
      javax.faces.el.EvaluationException: Exception while invoking expression #{activitiesSearchAction.exitToAccountSummary}
      at java.lang.Throwable.(Throwable.java:218)
      at java.lang.RuntimeException.(RuntimeException.java:61)
      at javax.faces.FacesException.(FacesException.java:47)
      at javax.faces.el.EvaluationException.(EvaluationException.java:44)
      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
      at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
      at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
      at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:148)
      at org.jboss.seam.core.Pages.callAction(Pages.java:499)
      at org.jboss.seam.core.Pages.enterPage(Pages.java:248)
      at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:276)
      at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:214)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:40)
      at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:63)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:939)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:918)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:106)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:40)
      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:40)
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:40)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:64)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:40)
      at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
      at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:173)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:106)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
      at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:173)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:106)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:75)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:710)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:276)
      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:402)
      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:81)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:615)
      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1408)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:107)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:394)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:294)
      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:85)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:532)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:583)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:973)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1063)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1458)
      Caused by: java.lang.NullPointerException
      at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:27)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:27)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:95)
      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:42)
      at com.churchmutual.rms.form.InspectionSearchForm_$$_javassist_9.getSelectedPriority(InspectionSearchForm_$$_javassist_9.java:0)
      at com.churchmutual.rms.service.impl.InspectionRequestSearchConstraintProvider$3.isPayloadValid(InspectionRequestSearchConstraintProvider.java:57)
      at com.churchmutual.rms.util.JPAQueryBuilder.buildFront(JPAQueryBuilder.java:97)
      at com.churchmutual.rms.util.JPAQueryBuilder.buildQueryString(JPAQueryBuilder.java:85)
      at com.churchmutual.rms.util.JPAQueryBuilder.build(JPAQueryBuilder.java:57)
      at com.churchmutual.rms.service.impl.AccountInformationServiceImpl.buildAndRunQuery(AccountInformationServiceImpl.java:445)
      at com.churchmutual.rms.service.impl.AccountInformationServiceImpl.search(AccountInformationServiceImpl.java:403)
      at sun.reflect.GeneratedMethodAccessor324137986.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:31)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:22)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:27)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:95)
      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:42)
      at com.churchmutual.rms.service.impl.AccountInformationServiceImpl_$$_javassist_10.search(AccountInformationServiceImpl_$$_javassist_10.java:0)
      at com.churchmutual.rms.action.impl.InspectionSearchActionImpl.doSearch(InspectionSearchActionImpl.java:328)
      at com.churchmutual.rms.action.impl.InspectionSearchActionImpl.search(InspectionSearchActionImpl.java:309)
      at sun.reflect.GeneratedMethodAccessor1447893139.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:31)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:22)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:27)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:95)
      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:42)
      at com.churchmutual.rms.action.impl.InspectionSearchActionImpl_$$_javassist_8.search(InspectionSearchActionImpl_$$_javassist_8.java:0)
      at com.churchmutual.rms.action.impl.ActivitiesSearchActionImpl.exitToAccountSummary(ActivitiesSearchActionImpl.java:163)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:31)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:22)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:27)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:95)
      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:42)
      at com.churchmutual.rms.action.impl.ActivitiesSearchActionImpl_$$_javassist_14.exitToAccountSummary(ActivitiesSearchActionImpl_$$_javassist_14.java:0)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
      ... 45 more

        • 1. Re: Seam Exceptions during load testing
          pmuir

          What version odf Seam?

          • 2. Re: Seam Exceptions during load testing
            gayatri.ramamurthi

            we are using 1.2.1GA.

            • 3. Re: Seam Exceptions during load testing
              pmuir

              Unfortunately there are no more community releases of Seam 1.2 planned, either you need to

              a) upgrade to seam 2.0. If you see this problem there, then we can certainly see if we can fix it

              or

              b) work through the JBoss support channel

              If you can reproduce using Seam2, and we can fix it, you may well be able to backport the fix yourself.

              • 4. Re: Seam Exceptions during load testing
                gayatri.ramamurthi

                We think we have a solution. But not sure why exactly it works. We are still using Seam 1.2.1GA.

                A litle background. Our architecture is a typicaly n-tier one (why we adopted this is model? See here http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058248).

                JSF(Facelets)--uses FORM objects--Action class--uses DTO--Service layer--uses Domain objects to persist.

                We use Seam security for both authentication and authorization. Usually we have the rules in security.drl and
                @Restrict at method level at the service layer.

                However we did have @Restrict("#{identity.loggedIn}") at the FORM Class level to ensure that the user is re-directed
                to the login page when the conversation timesout.

                After adding a few more debug stmts to Identity and SecurityInterceptor class (where the NullPointerException occurs) what
                we noticed was, when the NullPointerException occurs the expression that is being evaluated is "identity.loggedIn" and
                the interceptor target was always a FORM object.

                On a hunch we removed "@Restrict("#{identity.loggedIn}")" from the FORM and added "required-login=true" in pages.xml
                (which should have been done in the first place).

                Now when we re ran our concurrency test, the exception went away. So the question is ...
                - How does "@Restrict("#{identity.loggedIn}")" at a Class level in a FORM object cause the NPE when there are concurrent users?
                - Why does this not occur for a single user?

                We would love to dig into the Seam code and find answers. Unfortunately we have very limited time on our hands. So I
                was wondering if there is anybody out there who is familiar with this particular Seam code and can shed some light
                on this behaviour.

                Thanks.

                • 5. Re: Seam Exceptions during load testing
                  pmuir

                  Your stack trace line numbers don't match with Seam 1.2.1 - are you sure you are using 1.2.1 - I would like to dig into this.

                  • 6. Re: Seam Exceptions during load testing
                    gayatri.ramamurthi

                    Yes we are using 1.2.1.

                    • 7. Re: Seam Exceptions during load testing
                      gayatri.ramamurthi

                      There were few variations of the same problem .. I am pasting the patterns we noticed in the exceptions.

                      Pattern 1 :
                      *********************************************************************************************************************************************
                      Caused by: javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'loggedIn'
                      at com.sun.el.lang.ELSupport.throwUnhandled(ELSupport.java:52)
                      at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
                      at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
                      at org.jboss.seam.util.UnifiedELValueBinding.getValue(UnifiedELValueBinding.java:42)
                      at org.jboss.seam.security.Identity.evaluateExpression(Identity.java:514)
                      at org.jboss.seam.security.Identity.checkRestriction(Identity.java:150)
                      at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:44)



                      Pattern 2 :
                      **********************************************************************************************************************************************
                      Caused by: java.lang.NullPointerException
                      at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:27)
                      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)




                      Pattern 3 :
                      **********************************************************************************************************************************************
                      Caused by: javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'identity'
                      at java.lang.Throwable.(Throwable.java:196)
                      at java.lang.Exception.(Exception.java:41)
                      at java.lang.RuntimeException.(RuntimeException.java:43)
                      at javax.el.ELException.(ELException.java:49)
                      at javax.el.PropertyNotFoundException.(PropertyNotFoundException.java:54)
                      at com.sun.el.lang.ELSupport.throwUnhandled(ELSupport.java:52)
                      at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
                      at com.sun.el.parser.AstValue.getValue(AstValue.java:114)
                      at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:193)
                      at org.jboss.seam.util.UnifiedELValueBinding.getValue(UnifiedELValueBinding.java:34)
                      at org.jboss.seam.security.Identity.evaluateExpression(Identity.java:506)
                      at org.jboss.seam.security.Identity.checkRestriction(Identity.java:149)
                      at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:27)
                      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)