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