openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Arnošt <pavel.arn...@loutka.cz>
Subject Re[2]: Passivating and restoring beans on reload
Date Mon, 25 Jun 2012 21:51:39 GMT
Hi,

I created new trivial maven project with OWB+MyFaces (attached) and I'm 
still getting errors:

VI 25, 2012 11:39:20 ODP. 
org.apache.webbeans.web.context.WebContextsService 
lazyStartSessionContext
WARNING: Could NOT lazily initialize session context because of null 
RequestContext
VI 25, 2012 11:39:20 ODP. org.apache.webbeans.web.failover.FailOverBag 
restore
SEVERE: 
java.lang.NullPointerException
at 
org.apache.webbeans.web.context.WebContextsService.activateContext(WebContextsService.java:813)
at 
org.apache.webbeans.web.failover.FailOverBag.restore(FailOverBag.java:99)
at 
org.apache.webbeans.web.failover.FailOverBagWrapper.restore(FailOverBagWrapper.java:81)
at 
org.apache.webbeans.web.failover.DefaultOwbFailOverService.restoreBeans(DefaultOwbFailOverService.java:171)
at 
org.apache.webbeans.web.failover.FailOverBagWrapper.sessionDidActivate(FailOverBagWrapper.java:162)
at 
org.apache.catalina.session.StandardSession.activate(StandardSession.java:939)
It's very easy to reproduce it, just start the application, load 
index.faces page, restart the server and exception will be thrown every 
time. Thomas,  I don't understand how you make it work :-) Could you 
please look at the attached maven project (it's really very simple, 
just 3 classes and few configuration files) if there is something 
different than in your setup? OWB is started with 
WebBeansConfigurationListener.

Regards,
Pavel

------ Původní zpráva ------
Od: "Mark Struberg" <struberg@yahoo.de>
Komu: "user@openwebbeans.apache.org" <user@openwebbeans.apache.org>
Odesláno: 24.6.2012 21:17:59
Předmět: Re: Passivating and restoring beans on reload
>short note:
>
>the full location is
>
>
>META-INF/openwebbeans/openwebbeans.properties
>
>LieGrue,
>strub
>
>
>
>
>
>>
>>________________________________
>>From: Thomas Andraschko <zoigln@googlemail.com>
>>To: user@openwebbeans.apache.org
>>Sent: Sunday, June 24, 2012 8:44 PM
>>Subject: Re: Passivating and restoring beans on reload
>>
>>
>>Hi,
>>
>>ah sorry, that was your question actually :D
>>i use it yes but without tomcat module :)
>>I just registered the OWB listener via web.xml and added the openwebbeans.properties:
>>
>>configuration.ordinal=100
>>org.apache.webbeans.web.failover.issupportfailover=true
>>org.apache.webbeans.web.failover.issupportpassivation=true
>>
>>Regards,
>>Thomas
>>
>>
>>
>>2012/6/24 Pavel Arnošt <pavel.arnost@loutka.cz>
>>
>>Hi,
>>
>>>
>>>
>>>
>>>good to hear that Tomcat 7.0.22+ issue will be solved, but I'm getting that exception
with Tomcat 7.0.21. Are you using beans passivation in Tomcat 7.0.21 succesfully?
>>>
>>>
>>>2012/6/24 Thomas Andraschko <zoigln@googlemail.com>
>>>
>>>Hi,
>>>
>>>>
>>>>
>>>>i faced this issue some months before: https://issues.apache.org/jira/browse/OWB-669.
>>>>It's because ServletRequestListener will be called after session replication
and therefore OWB can't prepare the beans in the session.
>>>>
>>>>I already provided a patch to move the failover stuff to an ServletFilter
and this will be included in the next version.
>>>>
>>>>Currently i must be registered in the web.xml manually but i will add an further
patch, were the Filter will be installed automatically within Tomcat.
>>>>
>>>>I will also stay with 7.0.21 until the next OWB version will be released :)
>>>>
>>>>Regards,
>>>>Thomas
>>>>
>>>>
>>>>2012/6/24 Pavel Arnošt <pavel.arnost@loutka.cz>
>>>>
>>>>Hi,
>>>>
>>>>>
>>>>>
>>>>>I have Tomcat 7.0.21 (because I have taken notice that there is a problem
with passivation in Tomcat 7.0.22+) with OWB 1.1.4 and MyFaces 2.1.8 and I'm trying to activate
beans passivation/restoration on reload. I installed OWB and MyFaces into Tomcat's lib directory
and into server.xml I added line:
>>>>>
>>>>><Listener className="org.apache.webbeans.web.tomcat.ContextLifecycleListener"
/>
>>>>>
>>>>>in META-INF/openwebbeans/openwebbeans.properties I have:
>>>>>
>>>>>org.apache.webbeans.web.failover.issupportfailover=true
>>>>>org.apache.webbeans.web.failover.issupportpassivation=true
>>>>>
>>>>>Now on reload I'm getting:
>>>>>
>>>>>15:27:41.375 ERROR o.a.w.web.failover.FailOverBag - java.lang.NullPointerException:
null
>>>>>at org.apache.webbeans.web.context.WebContextsService.activateContext(WebContextsService.java:813)
~[openwebbeans-web-1.1.4.jar:1.1.4]
>>>>>at org.apache.webbeans.web.failover.FailOverBag.restore(FailOverBag.java:99)
~[openwebbeans-web-1.1.4.jar:1.1.4]
>>>>>at org.apache.webbeans.web.failover.FailOverBagWrapper.restore(FailOverBagWrapper.java:81)
[openwebbeans-web-1.1.4.jar:1.1.4]
>>>>>at org.apache.webbeans.web.failover.DefaultOwbFailOverService.restoreBeans(DefaultOwbFailOverService.java:171)
[openwebbeans-web-1.1.4.jar:1.1.4]
>>>>>at org.apache.webbeans.web.failover.FailOverBagWrapper.sessionDidActivate(FailOverBagWrapper.java:162)
[openwebbeans-web-1.1.4.jar:1.1.4]
>>>>>at org.apache.catalina.session.StandardSession.activate(StandardSession.java:939)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:287)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.session.StandardManager.load(StandardManager.java:204)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:470)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5241)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3854)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:949)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:360)
[catalina.jar:7.0.21]
>>>>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) [servlet-api.jar:na]
>>>>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) [servlet-api.jar:na]
>>>>>at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
[catalina.jar:7.0.21]
>>>>>at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
[catalina.jar:7.0.21]
>>>>>at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:269)
[tomcat-coyote.jar:7.0.21]
>>>>>at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
[tomcat-coyote.jar:7.0.21]
>>>>>at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1773)
[tomcat-coyote.jar:7.0.21]
>>>>>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[na:1.7.0_04]
>>>>>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[na:1.7.0_04]
>>>>>at java.lang.Thread.run(Thread.java:722) [na:1.7.0_04]
>>>>>
>>>>>What am I doing wrong?
>>>>>Thanks,
>>>>>Regards,
>>>>>Pavel
>>>>>
>>>>>
>>>>>
>

Mime
View raw message