You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Łukasz Lenart <lu...@gmail.com> on 2012/10/25 07:47:43 UTC

Re: Struts 2 portlet - spring example- Liferay 6.1 GA 2

2012/10/24 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> Has someone tried the last struts2 portlet example with Liferay 6.1 GA 2? Object factory problems appear. It seems struts 2 tries to access the webApplicationContext of Spring before it is initialized.

Could you provide more details ?


Regards
-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts 2 portlet - spring example- Liferay 6.1 GA 2

Posted by Juan Jose Fuentes Esteban <ju...@grupoica.com>.
I could not agree more. If it's Liferay, then, develop THE LIFERAY WAY. If
not, be prepared for a lot of incompatibilities, framework problems,
integration errors...

-----Mensaje original-----
De: Frans Thamura [mailto:frans@meruvian.org]
Enviado el: jueves, 25 de octubre de 2012 16:40
Para: Struts Users Mailing List
Asunto: Re: Struts 2 portlet - spring example- Liferay 6.1 GA 2

Years we invest in struts2 and liferay

I find several perm gen error if ww create a war for liferay

Wish s2 can solve it.

To painfull develop s2 in liferay sdk

That is my opinion

Frans Thamura
Meruvian
On Oct 25, 2012 9:20 PM, "Lukasz Lenart" <lu...@apache.org> wrote:

> 2012/10/25 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> > Yes Lukasz, but it seems there is a problem in this specific version
> > of
> Liferay, as explained here:
> >
> >
> http://www.liferay.com/es/community/forums/-/message_boards/message/15
> 705348
> >
> > In this release of Liferay, Portlets are initialized BEFORE servlet
> listeners are executed. So, if using Struts Jsr286Dispatcher, the
> StrutsSpringObjectFactory can't find a suitable WebApplicationContext
> (that should have been initialized in the servlet context listener).
> >
> > In here, http://issues.liferay.com/browse/LPS-29103 , it is stated
> > that
> it is solved in a patch to the still not released Liferay 6.2.X,
> although if you look at the comments, it still fails in something...
>
> So it's an issue with Lifray not with Struts 2 the Portlet Plugin
>
>
> Regards
> --
> Łukasz
> mobile +48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG
> conference - Confitura http://confitura.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 portlet - spring example- Liferay 6.1 GA 2

Posted by Frans Thamura <fr...@meruvian.org>.
Years we invest in struts2 and liferay

I find several perm gen error if ww create a war for liferay

Wish s2 can solve it.

To painfull develop s2 in liferay sdk

That is my opinion

Frans Thamura
Meruvian
On Oct 25, 2012 9:20 PM, "Lukasz Lenart" <lu...@apache.org> wrote:

> 2012/10/25 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> > Yes Lukasz, but it seems there is a problem in this specific version of
> Liferay, as explained here:
> >
> >
> http://www.liferay.com/es/community/forums/-/message_boards/message/15705348
> >
> > In this release of Liferay, Portlets are initialized BEFORE servlet
> listeners are executed. So, if using Struts Jsr286Dispatcher, the
> StrutsSpringObjectFactory can't find a suitable WebApplicationContext (that
> should have been initialized in the servlet context listener).
> >
> > In here, http://issues.liferay.com/browse/LPS-29103 , it is stated that
> it is solved in a patch to the still not released Liferay 6.2.X, although
> if you look at the comments, it still fails in something...
>
> So it's an issue with Lifray not with Struts 2 the Portlet Plugin
>
>
> Regards
> --
> Łukasz
> mobile +48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: Struts 2 portlet - spring example- Liferay 6.1 GA 2

Posted by Juan Jose Fuentes Esteban <ju...@grupoica.com>.
It's not that It is a real solution but a workaround... but this is what I
have done

I've extended StrutsSpringObjectFactory to allow this class to directly
create the WebApplicationContext. Of course this class has checks that
evaluate if there is a WebApplicationContext already created. Also, I
subclassed ContextLoaderListener to NOT create the context but to merely
hold a ContexLoader object, to be able to clean the ApplicationContext when
the servlet context is destroyed.

It's not an elegant way because it's very specific to this concrete
situation, but does  the trick.

Now I have problems with Spring web scopes in spring action beans (spring's
"request" , "session" bean scopes I mean) . It seems Spring's
RequestContextFilter doesn't fire... :(

-----Mensaje original-----
De: Martin Gainty [mailto:mgainty@hotmail.com]
Enviado el: jueves, 25 de octubre de 2012 16:50
Para: Struts Users Mailing List
Asunto: RE: Struts 2 portlet - spring example- Liferay 6.1 GA 2


Lukasz and team

Just a thought but in web.xml can you reorder the Struts Listener(s) to be
configured before Liferay (filters and listeners and servlets and taglibs)?

does this help?
Martin
______________________________________________
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
de ceci est interdite. Ce message sert à l'information seulement et n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les email
peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité pour le contenu fourni.


> From: lukaszlenart@apache.org
> Date: Thu, 25 Oct 2012 16:20:04 +0200
> Subject: Re: Struts 2 portlet - spring example- Liferay 6.1 GA 2
> To: user@struts.apache.org
>
> 2012/10/25 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> > Yes Lukasz, but it seems there is a problem in this specific version of
> > Liferay, as explained here:
> >
> > http://www.liferay.com/es/community/forums/-/message_boards/message/
> > 15705348
> >
> > In this release of Liferay, Portlets are initialized BEFORE servlet
> > listeners are executed. So, if using Struts Jsr286Dispatcher, the
> > StrutsSpringObjectFactory can't find a suitable WebApplicationContext
> > (that should have been initialized in the servlet context listener).
> >
> > In here, http://issues.liferay.com/browse/LPS-29103 , it is stated that
> > it is solved in a patch to the still not released Liferay 6.2.X,
> > although if you look at the comments, it still fails in something...
>
> So it's an issue with Lifray not with Struts 2 the Portlet Plugin
>
>
> Regards
> --
> Łukasz
> mobile +48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG
> conference - Confitura http://confitura.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts 2 portlet - spring example- Liferay 6.1 GA 2

Posted by Martin Gainty <mg...@hotmail.com>.
Lukasz and team

Just a thought but in web.xml can you reorder the Struts Listener(s) to be configured before Liferay (filters and listeners and servlets and taglibs)?

does this help?
Martin 
______________________________________________ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.


> From: lukaszlenart@apache.org
> Date: Thu, 25 Oct 2012 16:20:04 +0200
> Subject: Re: Struts 2 portlet - spring example- Liferay 6.1 GA 2
> To: user@struts.apache.org
> 
> 2012/10/25 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> > Yes Lukasz, but it seems there is a problem in this specific version of Liferay, as explained here:
> >
> > http://www.liferay.com/es/community/forums/-/message_boards/message/15705348
> >
> > In this release of Liferay, Portlets are initialized BEFORE servlet listeners are executed. So, if using Struts Jsr286Dispatcher, the StrutsSpringObjectFactory can't find a suitable WebApplicationContext (that should have been initialized in the servlet context listener).
> >
> > In here, http://issues.liferay.com/browse/LPS-29103 , it is stated that it is solved in a patch to the still not released Liferay 6.2.X, although if you look at the comments, it still fails in something...
> 
> So it's an issue with Lifray not with Struts 2 the Portlet Plugin
> 
> 
> Regards
> -- 
> Łukasz
> mobile +48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
 		 	   		  

Re: Struts 2 portlet - spring example- Liferay 6.1 GA 2

Posted by Lukasz Lenart <lu...@apache.org>.
2012/10/25 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> Yes Lukasz, but it seems there is a problem in this specific version of Liferay, as explained here:
>
> http://www.liferay.com/es/community/forums/-/message_boards/message/15705348
>
> In this release of Liferay, Portlets are initialized BEFORE servlet listeners are executed. So, if using Struts Jsr286Dispatcher, the StrutsSpringObjectFactory can't find a suitable WebApplicationContext (that should have been initialized in the servlet context listener).
>
> In here, http://issues.liferay.com/browse/LPS-29103 , it is stated that it is solved in a patch to the still not released Liferay 6.2.X, although if you look at the comments, it still fails in something...

So it's an issue with Lifray not with Struts 2 the Portlet Plugin


Regards
-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts 2 portlet - spring example- Liferay 6.1 GA 2

Posted by Juan Jose Fuentes Esteban <ju...@grupoica.com>.
Yes Lukasz, but it seems there is a problem in this specific version of Liferay, as explained here:

http://www.liferay.com/es/community/forums/-/message_boards/message/15705348

In this release of Liferay, Portlets are initialized BEFORE servlet listeners are executed. So, if using Struts Jsr286Dispatcher, the StrutsSpringObjectFactory can't find a suitable WebApplicationContext (that should have been initialized in the servlet context listener).

In here, http://issues.liferay.com/browse/LPS-29103 , it is stated that it is solved in a patch to the still not released Liferay 6.2.X, although if you look at the comments, it still fails in something...

Juan José Fuentes Esteban 
Grupo I.C.A. Informática y Comunicaciones Avanzadas S.L.
Complejo Empresarial Ecourban - Edificio Azul
C/Almogàvers 119 - 123, Planta 3 Oficina 4
08018 Barcelona
Telf: 93.452.02.65 - Fax: 93.451.35.42
http://www.grupoica.com

-----Mensaje original-----
De: Łukasz Lenart [mailto:lukasz.lenart@gmail.com] 
Enviado el: jueves, 25 de octubre de 2012 7:48
Para: Struts Users Mailing List
Asunto: Re: Struts 2 portlet - spring example- Liferay 6.1 GA 2

2012/10/24 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> Has someone tried the last struts2 portlet example with Liferay 6.1 GA 2? Object factory problems appear. It seems struts 2 tries to access the webApplicationContext of Spring before it is initialized.

Could you provide more details ?


Regards
--
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org