> Hi to update in a db you need a transaction -> ejb

I just confirmed that it is possible to use ejb in user bean when
@PreDestroy method is called, but I also confirmed that the container is
calling @PreDestroy more than once (at least 2 times). See stack trace
below.


INFO: Server startup in 21725 ms
Dec 07, 2012 1:49:15 AM org.apache.myfaces.el.unified.ResolverBuilderBase
sortELResolvers
INFO: Chain of EL resolvers for Faces sorted with:
org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator@1b3ef75d and
the result order is
[org.apache.myfaces.el.unified.resolver.implicitobject.ImplicitObjectResolver@42e208a4,
org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver@5a5694a,
org.apache.myfaces.el.FlashELResolver@2ea37c2b,
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@6f2d02f8,
org.apache.myfaces.el.unified.resolver.ResourceResolver@741e20cd,
javax.el.ResourceBundleELResolver@65fbae49,
org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@6e6f6eed,
javax.el.MapELResolver@55dbc23f, javax.el.ListELResolver@4eade222,
javax.el.ArrayELResolver@79d94e88, javax.el.BeanELResolver@29b30137,
org.apache.webbeans.el.WebBeansELResolver@2714d744]
[EL Info]: 2012-12-07 01:49:17.487--ServerSession(1201064079)--EclipseLink,
version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
[EL Info]: 2012-12-07
01:49:18.064--ServerSession(1201064079)--file:/C:/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/mcmsweb/WEB-INF/classes/_mcmsPU
login successful
GoogleCalendarUtil: calendarList.getEntries().size() = 2
GoogleCalendarUtil: calendar ID/summary = oleta...@gmail.com/mcmsweb
GoogleCalendarUtil: calendar ID/summary =
998449989...@developer.gserviceaccount.com/998449989...@developer.gserviceaccount.com
GoogleCalendarUtil: events.getItems().size() = 250
pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
01:49:18 EST 2012
pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
01:49:41 EST 2012
pf_UsersController.logout(): administrator logged out at Fri Dec 07
01:50:18 EST 2012
pf_UsersController.updateLastLogoutDt(): Error updating USER last logout
date/time: Fri Dec 07 01:50:18 EST 2012
java.lang.NullPointerException
at
jsf.users.pf_UsersController.updateLastLogoutDt(pf_UsersController.java:950)
at jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:666)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
at
org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
at
org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
pf_UsersController.sessionTimeout(): administrator session ended at Fri Dec
07 01:50:18 EST 2012
at
org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
at
org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
at
org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
at
org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
at
org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsService.java:340)
at
org.apache.openejb.cdi.CdiAppContextsService.endContext(CdiAppContextsService.java:131)
at
org.apache.tomee.catalina.WebBeansListener.sessionDestroyed(WebBeansListener.java:178)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:742)
at
org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1253)
at
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:190)
at jsf.users.pf_UsersController.logout(pf_UsersController.java:647)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:322)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:117)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108)
at
jsf.users.pf_UsersController_$$_javassist_2.logout(pf_UsersController_$$_javassist_2.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:737)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:467)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:246)
at de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:91)
at de.odysseus.el.tree.impl.ast.AstMethod.invoke(AstMethod.java:104)
at de.odysseus.el.tree.impl.ast.AstEval.invoke(AstEval.java:71)
at de.odysseus.el.TreeMethodExpression.invoke(TreeMethodExpression.java:132)
at
org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96)
at
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:68)
at javax.faces.component.UICommand.broadcast(UICommand.java:120)
at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1028)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:286)
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1375)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:759)
at
org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:38)
at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:148)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at pf.LoginFilter.doFilter(LoginFilter.java:194)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Dec 07, 2012 1:50:19 AM
org.apache.webbeans.component.AbstractInjectionTargetBean preDestroyDefault
SEVERE: An error occurred while executing [@PreDestroy.]
java.lang.NullPointerException
at pf.ApplicationScopeBean.logout(ApplicationScopeBean.java:268)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:322)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:117)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108)
at
pf.ApplicationScopeBean_$$_javassist_5.logout(ApplicationScopeBean_$$_javassist_5.java)
at jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:671)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
at
org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
at
org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
at
org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
at
org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
at
org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
at
org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
at
org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsService.java:340)
at
org.apache.openejb.cdi.CdiAppContextsService.endContext(CdiAppContextsService.java:131)
at
org.apache.tomee.catalina.WebBeansListener.sessionDestroyed(WebBeansListener.java:178)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:742)
at
org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1253)
at
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:190)
at jsf.users.pf_UsersController.logout(pf_UsersController.java:647)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:322)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:117)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108)
at
jsf.users.pf_UsersController_$$_javassist_2.logout(pf_UsersController_$$_javassist_2.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:737)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:467)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:246)
at de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:91)
at de.odysseus.el.tree.impl.ast.AstMethod.invoke(AstMethod.java:104)
at de.odysseus.el.tree.impl.ast.AstEval.invoke(AstEval.java:71)
at de.odysseus.el.TreeMethodExpression.invoke(TreeMethodExpression.java:132)
at
org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96)
at
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:68)
at javax.faces.component.UICommand.broadcast(UICommand.java:120)
at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1028)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:286)
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1375)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:759)
at
org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:38)
at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:148)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at pf.LoginFilter.doFilter(LoginFilter.java:194)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Dec 07, 2012 1:50:19 AM org.apache.webbeans.component.AbstractOwbBean
destroy
SEVERE: Exception thrown while destroying bean instance :
[pf_UsersController, Name:pf_usersController, WebBeans Type:MANAGED, API
Types:[java.lang.Object,java.io.Serializable,jsf.users.pf_UsersController],
Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
org.apache.webbeans.exception.WebBeansException:
java.lang.NullPointerException
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:303)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
at
org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
at
org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
at
org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
at
org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
at
org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
at
org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
at
org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsService.java:340)
at
org.apache.openejb.cdi.CdiAppContextsService.endContext(CdiAppContextsService.java:131)
at
org.apache.tomee.catalina.WebBeansListener.sessionDestroyed(WebBeansListener.java:178)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:742)
at
org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1253)
at
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:190)
at jsf.users.pf_UsersController.logout(pf_UsersController.java:647)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:322)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:117)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108)
at
jsf.users.pf_UsersController_$$_javassist_2.logout(pf_UsersController_$$_javassist_2.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:737)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:467)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:246)
at de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:91)
at de.odysseus.el.tree.impl.ast.AstMethod.invoke(AstMethod.java:104)
at de.odysseus.el.tree.impl.ast.AstEval.invoke(AstEval.java:71)
at de.odysseus.el.TreeMethodExpression.invoke(TreeMethodExpression.java:132)
at
org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96)
at
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:68)
at javax.faces.component.UICommand.broadcast(UICommand.java:120)
at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1028)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:286)
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1375)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:759)
at
org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:38)
at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:148)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at pf.LoginFilter.doFilter(LoginFilter.java:194)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at pf.ApplicationScopeBean.logout(ApplicationScopeBean.java:268)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:322)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:117)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108)
at
pf.ApplicationScopeBean_$$_javassist_5.logout(ApplicationScopeBean_$$_javassist_5.java)
at jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:671)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
... 74 more

pf_UsersController.loginUser(): brian logged in at Fri Dec 07 01:50:27 EST
2012
pf_UsersController.sessionTimeout(): administrator session ended at Fri Dec
07 01:50:47 EST 2012
Dec 07, 2012 1:51:53 AM org.apache.openejb.cdi.CdiAppContextsService
lazyStartSessionContext
WARNING: Could NOT lazily initialize session context because of null
RequestContext
pf_UsersController.sessionTimeout(): brian session ended at Fri Dec 07
01:51:53 EST 2012
java.lang.NullPointerException
at
jsf.users.pf_UsersController.updateLastLogoutDt(pf_UsersController.java:950)
at jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:666)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
at
org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
at
org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
pf_UsersController.updateLastLogoutDt(): Error updating USER last logout
date/time: Fri Dec 07 01:52:06 EST 2012
pf_UsersController.sessionTimeout():  session ended at Fri Dec 07 01:52:06
EST 2012
at
org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
at
org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
at
org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
at
org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
at
org.apache.webbeans.web.context.SessionContextManager.destroySessionContextWithSessionId(SessionContextManager.java:84)
at
org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsService.java:348)
at
org.apache.openejb.cdi.CdiAppContextsService.endContext(CdiAppContextsService.java:131)
at
org.apache.tomee.catalina.WebBeansListener.sessionDestroyed(WebBeansListener.java:178)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
at
org.apache.catalina.session.StandardSession.isValid(StandardSession.java:658)
at
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:534)
at
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:519)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1352)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:722)
Dec 07, 2012 1:52:06 AM org.apache.openejb.cdi.CdiAppContextsService
lazyStartSessionContext
WARNING: Could NOT lazily initialize session context because of null
RequestContext



On Fri, Dec 7, 2012 at 1:28 AM, Romain Manni-Bucau <rmannibu...@gmail.com>wrote:

> Hi to update in a db you need a transaction -> ejb

Reply via email to