構造的に表示 平面上に表示 ツリー上に表示
スレッド数 [ 前へ | 次へ ]
toggle
R M
JSF(Icefaces) + Spring Portlet
2007/12/19 6:02
答え

R M

ランク: New Member

投稿数: 12

参加年月日: 2007/10/18

最近の投稿

hi,
i'm facing a problem with portlet development with ICEfaces / JSF and Spring. I want to use Spring's Dependency Injection in a JSF Portlet. I startet with modifying the liferay plugin: sample-icefaces-sun-portlet-4.3.4.1
For accessing spring-beans with request scope in my spring application context I added the RequestContextListener (org.springframework.web.context.request.RequestContextListener) in my web.xml.
But nevertheless i get following exception:

javax.servlet.jsp.JspException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personroleManagement': Scope 'request' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are actually operating within a web request and still receive this message,your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

they are suggesting using the listener - but i already do. somewhere i read the order of apperance of the listeners in the web.xml is of importance - the RequestContextListener should be first. I did so, but during Deployment Liferay changes my web.xml and puts PortletContextListene (com.liferay.portal.kernel.servlet.PortletContextListener) first!

I'm using Liferay 4.3.5 and Spring 2.0.5.

Does anybody know how to run spring+jsf portlets correctly? Any Help is appreciated.

Thanks
Raphael
Jakub Liska
RE: JSF(Icefaces) + Spring Portlet
2011/04/01 4:03
答え

Jakub Liska

ランク: Regular Member

投稿数: 187

参加年月日: 2010/03/25

最近の投稿

Hey guys,

doesn't work for me. I don't use JSF, but I still get this error.
Jonas Lauber
RE: JSF(Icefaces) + Spring Portlet
2011/05/06 8:14
答え

Jonas Lauber

ランク: New Member

投稿数: 3

参加年月日: 2011/04/14

最近の投稿

Did you get any luck? I am having the same troubles which gets me really frustrated...
Jakub Liska
RE: JSF(Icefaces) + Spring Portlet
2011/05/11 0:24
答え

Jakub Liska

ランク: Regular Member

投稿数: 187

参加年月日: 2010/03/25

最近の投稿

Hard to say Jonas, I finally didn't do it this way,

you could try if lazy-init helps
1
2<bean id="requestScopeBean"    class="SomeClass" scope="request"   lazy-init="true">
3    <aop:scoped-proxy />
4</bean>