openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Andraschko <zoi...@googlemail.com>
Subject Re: Re[6]: Passivating and restoring beans on reload
Date Tue, 26 Jun 2012 11:30:45 GMT
Hi Pavel,

ahh sorry, i forgot this. Yep this is already fixed in 1.1.5 SNAPSHOT. It
was part of my patch.

Regards,
THomas

2012/6/26 Pavel Arnošt <pavel.arnost@loutka.cz>

>  Hi Thomas,
>
> i tried OWB 1.1.3 and it works, there must be regression in 1.1.4. I
> looked at the source code and using ContextsService in FailOverBag/restore
> (as in 1.1.4) instead of SessionContextManager (as in 1.1.3) does not make
> sense to me, because ContextsService/WebContextsService is dependant on
> request context and that is not available while starting application. I
> will use version 1.1.3 and I hope that OWB-669 will be solved soon.
>
> Thanks for your time,
> Regards,
> Pavel
>
> ------ Původní zpráva ------
>
> Od: "Thomas Andraschko" <zoigln@googlemail.com>
> Komu: user@openwebbeans.apache.org;"Pavel Arnošt" <pavel.arnost@loutka.cz>
> Odesláno: 26.6.2012 11:17:19
> Předmět: Re: Re[4]: Passivating and restoring beans on reload
>
> Hi Pavel,
>
> We use session persistence we use Tomcat + MSM and that works fine.
>
> Could you try to add the <distributable /> tag in the web.xml and
> configure myfaces for replication?
>
> That means:
> org.apache.myfaces.SERIALIZE_STATE_IN_SESSION = true
>
> and for testing i would set:
> org.apache.myfaces.USE_ENCRYPTION = false (please configure the
> ALGORITHM/SECRET stuff later and enable encryption)
>
> Regards,
> THomas
>
> 2012/6/26 Pavel Arnošt < <pavel.arnost@loutka.cz>pavel.arnost@loutka.cz>
>
>>  Hi Thomas,
>>
>> I added StartupServletContextListener to web.xml and changed Java
>> version to 1.6. Than I started application with Jetty 8.1.4 maven plugin
>> and the exception is easily reproducible. Do you have session persistence
>> on? To get the exception, just:
>>
>> 1) unzip attached owbtest.zip
>> 2) run application with mvn jetty:run-war
>> 3) load page <http://localhost:8080/owbtest/index.faces>
>> http://localhost:8080/owbtest/index.faces
>> 4) stop maven
>> 5) run application with mvn jetty:run-war again and you will see the
>> exception in FailOverBag
>>
>>
>> ------ Původní zpráva ------
>> Od: "Thomas Andraschko" < <zoigln@googlemail.com>zoigln@googlemail.com>
>> Komu: <user@openwebbeans.apache.org>user@openwebbeans.apache.org;"Pavel
>> Arnošt" < <pavel.arnost@loutka.cz>pavel.arnost@loutka.cz>
>> Odesláno: 26.6.2012 10:16:32
>> Předmět: Re: Re[2]: Passivating and restoring beans on reload
>>
>> Hi Pavel,
>>
>> i just added org.apache.myfaces.webapp.StartupServletContextListener in
>> the web.xml, changed Java version to 1.6 and startet with Jetty8 maven
>> plugin.
>> works fine for me!
>>
>> Regards,
>> Thomas
>>
>> 2012/6/25 Pavel Arnošt < <pavel.arnost@loutka.cz><pavel.arnost@loutka.cz>
>> pavel.arnost@loutka.cz>
>>
>>> 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> <struberg@yahoo.de>
>>> struberg@yahoo.de>
>>> Komu: " <user@openwebbeans.apache.org> <user@openwebbeans.apache.org>
>>> user@openwebbeans.apache.org" < <user@openwebbeans.apache.org><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><zoigln@googlemail.com>
>>>>> zoigln@googlemail.com>
>>>>> To: <user@openwebbeans.apache.org> <user@openwebbeans.apache.org>
>>>>> 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><pavel.arnost@loutka.cz>
>>>>> 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><zoigln@googlemail.com>
>>>>>> zoigln@googlemail.com>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> i faced this issue some months before:
>>>>>>> <https://issues.apache.org/jira/browse/OWB-669><https://issues.apache.org/>
>>>>>>> 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><pavel.arnost@loutka.cz>
>>>>>>> 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