2 Replies Latest reply on Jun 16, 2007 4:28 PM by David MacBride

    NPE when accessing EM with Seam-managed transactions

    David MacBride Newbie

      Hi,

      I've been trying to persist an entity to DB, but I'm unable to get the seam-injected entity manager to work for me. I get errors even when trying to em.clear() and em.flush() so I think I have some fundamental problem. Below is the error I get when I call em.clear() from my view page. The action listener call fails with EJB transaction roolback, which seems t be caused by a NPE. I'm not sure where the NPE is coming from. Maybe the entitymanagerfactory can't be found? Maybe my analysis is way off base. :) Any help is greatly appreciated!

      Stack: JBOSS AS 4.05
      Seam: 1.1
      Hibernate: 3.2
      also with myfaces / facelets / ajax4jsf

      In the log I see:


      2007-06-16 14:27:36,945 DEBUG [org.jboss.seam.core.ManagedPersistenceContext] created seam managed persistence context for persistence unit: java:/EntityManagerFactories/fixmgmtDatasource
      2007-06-16 14:27:36,945 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2007-06-16 14:27:36,945 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
      2007-06-16 14:27:36,945 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Transaction already joined
      2007-06-16 14:27:36,945 INFO [STDOUT] SubmitCustomerAction.processRequest: start
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: org.jboss.seam.core.persistenceContexts
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.intercept.RootInterceptor] intercepted: submitCustomer.PRE_DESTORY
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.submitCustomer
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.submitCustomer
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.interceptors.RemoveInterceptor] Stateful component was removed: submitCustomer
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] after phase: INVOKE_APPLICATION(5)
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.afterPhase
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.facesMessages
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.facesMessages
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.facesMessages
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.facesMessages
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.facesMessages
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.facesMessages
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: org.jboss.seam.core.resourceBundle
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.locale
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.locale
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.locale
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.interpolator
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.interpolator
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.interpolator
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] rolling back transaction after phase: INVOKE_APPLICATION(5)
      2007-06-16 14:27:36,955 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2007-06-16 14:27:36,955 DEBUG [org.ajax4jsf.framework.renderer.AjaxPhaseListener] Process after phase INVOKE_APPLICATION(5)
      2007-06-16 14:27:36,955 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception
      javax.servlet.ServletException: Error calling action method of component with id formSubmitCustomer:buttonSubmitRequest
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:227)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:43)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:29)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:797)
      2007-06-16 14:27:36,995 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] exception root cause
      javax.faces.FacesException: Error calling action method of component with id formSubmitCustomer:buttonSubmitRequest
      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
      at javax.faces.component.UICommand.broadcast(UICommand.java:109)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:274)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:405)
      at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:227)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:43)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:29)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:797)
      Caused by:
      javax.faces.el.EvaluationException: /submitcustomer.xhtml @52,32 action="#{submitCustomer.processRequest}": javax.ejb.EJBTransactionRolledbackException: java.lang.NullPointerException
      at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
      ... 40 more
      Caused by:
      javax.ejb.EJBTransactionRolledbackException: java.lang.NullPointerException
      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
      at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
      at $Proxy518.processRequest(Unknown Source)
      at org.my.test.SubmitCustomer$$FastClassByCGLIB$$b278941a.invoke(<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
      at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
      at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
      at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:83)
      at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:52)
      at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$d7b79847.processRequest(<generated>)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
      ... 41 more
      Caused by:
      java.lang.NullPointerException
      at org.my.test.SubmitCustomerAction.processRequest(SubmitCustomerAction.java:52)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.BijectionInterceptor.bijectNonreentrantComponent(BijectionInterceptor.java:79)
      at org.jboss.seam.interceptors.BijectionInterceptor.bijectComponent(BijectionInterceptor.java:58)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:36)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
      at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
      at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
      at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      ... 84 more
      2007-06-16 14:27:37,346 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2007-06-16 14:27:37,346 DEBUG [org.jboss.seam.servlet.SeamExceptionFilter] ending request
      2007-06-16 14:27:37,346 ERROR [org.jboss.seam.exceptions.DebugPageHandler] redirecting to debug page
      java.lang.NullPointerException
      at org.my.test.SubmitCustomerAction.processRequest(SubmitCustomerAction.java:52)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.BijectionInterceptor.bijectNonreentrantComponent(BijectionInterceptor.java:79)
      at org.jboss.seam.interceptors.BijectionInterceptor.bijectComponent(BijectionInterceptor.java:58)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:36)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
      at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
      at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
      at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
      at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
      at $Proxy518.processRequest(Unknown Source)
      at org.my.test.SubmitCustomer$$FastClassByCGLIB$$b278941a.invoke(<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
      at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
      at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
      at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
      at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
      at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:83)
      at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:52)
      at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$d7b79847.processRequest(<generated>)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
      at javax.faces.component.UICommand.broadcast(UICommand.java:109)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:274)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:405)
      at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:227)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:43)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:29)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:797)



      The statefull session bean with action listener that is being called
      package org.my.test;
      
      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      import javax.persistence.EntityManager;
      
      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.Destroy;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Out;
      import org.jboss.seam.annotations.Scope;
      
      import com.ibm.commerce.fixmgmt.model.Customer;
      
      
      @Stateful
      @Scope(ScopeType.CONVERSATION)
      @Name("submitCustomer")
      public class SubmitCustomerAction implements SubmitCustomer {
      
       @In EntityManager fixmgmtEntityManager;
       private EntityManager em;
      
       @In(required=true) @Out
       private Customer customer = null;
      
       @Destroy @Remove
       public void destroy() { }
      
       public String processRequest(){
       System.out.println("SubmitCustomerAction.processRequest: start");
       //em.persist(customer);
       em.clear();
       System.out.println("SubmitCustomerAction.processRequest: end");
       return "main";
      
       }
      
      }
      



      components.xml:
      <components xmlns="http://jboss.com/products/seam/components"
       xmlns:core="http://jboss.com/products/seam/core">
      
       <core:transactionListener/>
      
       <!-- for seam-managed persistence -->
       <core:managed-persistence-context
       name="fixmgmtEntityManager"
       auto-create="true"
       persistence-unit-jndi-name="java:/EntityManagerFactories/fixmgmtDatasource"/>
      
      </components>
      


      persistence.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <persistence xmlns="http://java.sun.com/xml/ns/persistence"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
       version="1.0">
       <persistence-unit name="fixmgmtDatabase">
      
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:/fixmgmtDatasource</jta-data-source>
      
       <properties>
       <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
       <property name="hibernate.show_sql" value="true"/>
       <!-- These are the default for JBoss EJB3, but not for HEM: -->
       <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
       <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
      
       <!-- added for seam-managed persistence -->
       <property name="jboss.entity.manager.factory.jndi.name" value="java:/EntityManagerFactories/fixmgmtDatasource"/>
       </properties>
      
       </persistence-unit>
      </persistence>
      


      Datasource definition
      <?xml version="1.0" encoding="UTF-8"?>
      
      <datasources>
       <local-tx-datasource>
       <jndi-name>fixmgmtDatasource</jndi-name>
       <connection-url>jdbc:hsqldb:.</connection-url>
       <driver-class>org.hsqldb.jdbcDriver</driver-class>
       <user-name>sa</user-name>
       <password></password>
       </local-tx-datasource>
      </datasources>
      


      The JSF view page:
      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:a="https://ajax4jsf.dev.java.net/ajax"
       template="template.xhtml">
      
       <!-- content -->
       <ui:define name="content">
      
       <div class="section">
       <span class="errors">
       <h:messages />
       </span>
      
       <h:form styleClass="form" id="formSubmitCustomer">
       <h2>Fill out customer info</h2>
      
       <ui:define name="label"><b>Customer Number:</b></ui:define>
       <h:inputText
       id="textCustomerNumber" value="#{customer.customerNumber}"
       styleClass="inputText">
       </h:inputText>
       <h:message styleClass="message" id="messageTextCustomerNumber"
       for="textCustomerNumber"></h:message><p />
      
       <ui:define name="label"><b>Customer Name:</b></ui:define>
       <h:inputText
       id="textCustomerName" value="#{customer.customerName}"
       styleClass="inputText">
       </h:inputText>
       <h:message styleClass="message" id="messageTextCustomerNumber"
       for="textCustomerName"></h:message><p />
      
       <ui:define name="label"><b>Internal Customer</b></ui:define>
       <h:selectBooleanCheckbox
       id="booleanCheckboxCustomerType"
       value="#{customer.isInternal}">
       The customer is 'internal'
       </h:selectBooleanCheckbox><br />
       Select this checkbox if the customer is an internal customer.<br />
       <h:message styleClass="message" id="messageBooleanCheckboxCustomerType"
       for="booleanCheckboxCustomerType"></h:message>
       <p />
      
       <h:commandButton
       id="buttonSubmitRequest" styleClass="commandExButton"
       type="submit"
       action="#{submitCustomer.processRequest}"
       value="Submit Customer">
       </h:commandButton>
       </h:form>
       </div>
      
       </ui:define>
      
       <!-- sidebar -->
       <ui:define name="sidebar">
       <div id="navigation">
       <h2 class="access">Start of left navigation</h2>
       <!-- left nav -->
       <div id="left-nav">
       <div class="top-level"><a class="active" href="home.jsp">Stuff</a></div>
       </div>
      
       <!-- start related links --> <!-- ** If there's related links, html goes here. Otherwise, remove this line ** -->
       <!-- stop related links --></div>
       <!-- stop navigation -->
       </ui:define>
      </ui:composition>