Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
exception in ResourceHandlerImpl.handleResourceRequest PortletFaces Community Member 14 de abril de 2010 5:10
RE: exception in ResourceHandlerImpl.handleResourceRequest Neil Griffin 27 de abril de 2010 8:49
RE: exception in ResourceHandlerImpl.handleResourceRequest PortletFaces Community Member 27 de abril de 2010 10:56
RE: exception in ResourceHandlerImpl.handleResourceRequest Neil Griffin 27 de abril de 2010 14:03
RE: exception in ResourceHandlerImpl.handleResourceRequest PortletFaces Community Member 27 de abril de 2010 14:17
RE: exception in ResourceHandlerImpl.handleResourceRequest Neil Griffin 27 de abril de 2010 14:26
RE: exception in ResourceHandlerImpl.handleResourceRequest PortletFaces Community Member 29 de abril de 2010 2:01
RE: exception in ResourceHandlerImpl.handleResourceRequest Neil Griffin 29 de abril de 2010 7:01
RE: exception in ResourceHandlerImpl.handleResourceRequest PortletFaces Community Member 29 de abril de 2010 8:42
RE: exception in ResourceHandlerImpl.handleResourceRequest PortletFaces Community Member 29 de abril de 2010 8:52
RE: exception in ResourceHandlerImpl.handleResourceRequest Neil Griffin 29 de abril de 2010 9:57
RE: exception in ResourceHandlerImpl.handleResourceRequest Neil Griffin 29 de abril de 2010 12:12
RE: exception in ResourceHandlerImpl.handleResourceRequest Neil Griffin 5 de agosto de 2010 10:51
RE: exception in ResourceHandlerImpl.handleResourceRequest Neil Griffin 8 de mayo de 2012 16:13
RE: exception in ResourceHandlerImpl.handleResourceRequest PortletFaces Community Member 27 de abril de 2010 11:41
RE: exception in ResourceHandlerImpl.handleResourceRequest Neil Griffin 27 de abril de 2010 14:04
PortletFaces Community Member
exception in ResourceHandlerImpl.handleResourceRequest
14 de abril de 2010 5:10
Respuesta

PortletFaces Community Member

Ranking: Regular Member

Mensajes: 201

Fecha de incorporación: 2 de abril de 2012

Mensajes recientes

Hi all,

I developed a little portlet example using liferay 5.2 bundled version with tomcat-6.0.18, icefaces 2.0a2 , mojarra 2.0.3 snapshot and your bridge. A exception inside ResourceHandlerImpl.handleResourceRequest was thrown:

09:52:56,662 ERROR [jsp:?] org.portletfaces.bridge.BridgeException: java.lang.ClassCastException: com.liferay.portlet.ResourceRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
org.portletfaces.bridge.BridgeException: java.lang.ClassCastException: com.liferay.portlet.ResourceRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
at BridgeImpl.java.doFacesRequest(BridgeImpl.java:224)
at org.portletfaces.bridge.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:173)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:177)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:76)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:100)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
...
Caused by: java.lang.ClassCastException: com.liferay.portlet.ResourceRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
at org.icefaces.push.servlet.ICEfacesResourceHandler.isResourceRequest(ICEfacesResourceHandler.java:114)
at org.portletfaces.bridge.application.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:89)
at BridgeImpl.java.doFacesRequest(BridgeImpl.java:205)
... 106 more

The problem is inside this line:
if (wrappedResourceHandler.isResourceRequest(facesContext)) {

The reason is ICEfacesResourceHandler casts the request to HttpServletRequest when it is a PortletRequest...

More or less the same problem happened to me inside isResourceRequest (same file) in the line:
isResourceRequest = wrappedResourceHandler.isResourceRequest(facesContext);

Both problems happened to me about a month ago but I was affected by blank page after login issue. My portlet was just a demo/test and I changed this lines to avoid the problem (just not accessing the chain). So I am not in a hurry or similar, I am just trying to help.

Thanks!
Neil Griffin
RE: exception in ResourceHandlerImpl.handleResourceRequest
27 de abril de 2010 8:49
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2055

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

You've come across a servlet-api dependency in ICEfaces 2.0-alpha that we're aware of and working on fixing with ICEsoft. At this time (April 2010) the bridge has only limited functionality when used with ICEfaces. The project schedule indicates that the bridge should have good compatibility with ICEfaces in late May, and then reach production quality by the end of June.
PortletFaces Community Member
RE: exception in ResourceHandlerImpl.handleResourceRequest
27 de abril de 2010 10:56
Respuesta

PortletFaces Community Member

Ranking: Regular Member

Mensajes: 201

Fecha de incorporación: 2 de abril de 2012

Mensajes recientes

Does this mean that currently the PortletFacesBridge works better with Mojarra? If I want to create jsf2 portlets for use with Liferay 6.0, is there a currently working method? I'm working on preparing the development environment for the future, so I understand that we are not quite there yet. But I'm just trying to make sure I know the options. Can you elaborate on this a little? I have gone through the presentation and checked out the code. I had trouble getting anything to run on Glassfish V3 -- which of course includes the jsf 2.0 implementation Mojarra. I am trying to work on the development setup for this. Really excited about the project and would be happy to contribute.

Thanks,
Geoff
PortletFaces Community Member
RE: exception in ResourceHandlerImpl.handleResourceRequest
27 de abril de 2010 11:41
Respuesta

PortletFaces Community Member

Ranking: Regular Member

Mensajes: 201

Fecha de incorporación: 2 de abril de 2012

Mensajes recientes

Thank you Neil,

I was just trying to help, if you were already aware about it is enough for me. Finally I used ICEFaces cos in your example you are using javax.faces.webapp.FacesServlet as JSF Servlet. As Geoffrey says... Would it be better to use mojarra 2.0.3 directly?

Thanks.
Neil Griffin
RE: exception in ResourceHandlerImpl.handleResourceRequest
27 de abril de 2010 14:03
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2055

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

Yes at this time you can do Ajax type stuff with Mojarra's standard <f:ajax /> tag. ICEfaces compatibility is still about a month away. I've used the bridge in Liferay 6 and it works just as well as Liferay 6. There are some other threads in the forum about some GlassFish troubles. Right now we have to focus on getting the bridge to a feature-complete status, but then we can tackle other problems like app server troubles.
Neil Griffin
RE: exception in ResourceHandlerImpl.handleResourceRequest
27 de abril de 2010 14:04
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2055

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

The mentioning of FacesServlet in web.xml is just there to get Mojarra to bootstrap properly. It's actually not used by the bridge for requests.
PortletFaces Community Member
RE: exception in ResourceHandlerImpl.handleResourceRequest
27 de abril de 2010 14:17
Respuesta

PortletFaces Community Member

Ranking: Regular Member

Mensajes: 201

Fecha de incorporación: 2 de abril de 2012

Mensajes recientes

I would be more than happy to help, I had posted the stack trace about the glassfish. I have the code checked out and would love to contribute. Are you interested in outside contribution? If you are any tips on how to get started working on the issue with glassfish v3 would be welcome and if there is a better forum for talking development, please let me know. I'd like to think I can help with this.
Neil Griffin
RE: exception in ResourceHandlerImpl.handleResourceRequest
27 de abril de 2010 14:26
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2055

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

Yes, thanks so much for the offer -- we'd be happy to receive the help if you can identify a fix for the glassfish problem, or any other problems you find. Otherwise we'll have to fix those at the end after development is complete. Picking up the glassfish issue on the glassfish thread would be best.
PortletFaces Community Member
RE: exception in ResourceHandlerImpl.handleResourceRequest
29 de abril de 2010 2:01
Respuesta

PortletFaces Community Member

Ranking: Regular Member

Mensajes: 201

Fecha de incorporación: 2 de abril de 2012

Mensajes recientes

I also tried tried first with liferay 5.2 + glassfish and I identified the exception was cos CDI (WELD). I think the problem was something similar to the one reported here, some servlet-api dependency... I got the same exception using tomcat when I integrated WELD inside it. So finally I just removed WELD cos I think problem is there.

Thanks again!
Neil Griffin
RE: exception in ResourceHandlerImpl.handleResourceRequest
29 de abril de 2010 7:01
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2055

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

OK so if I understand you got the bridge working with Liferay 5.2 + Glassfish V3 by removing Weld?
PortletFaces Community Member
RE: exception in ResourceHandlerImpl.handleResourceRequest
29 de abril de 2010 8:42
Respuesta

PortletFaces Community Member

Ranking: Regular Member

Mensajes: 201

Fecha de incorporación: 2 de abril de 2012

Mensajes recientes

No, just the opposite... I checked that tomcat with WELD throws the same exception than in glassfish. I do not know how to remove weld from glassfish v3 (or even if it is possible).
PortletFaces Community Member
RE: exception in ResourceHandlerImpl.handleResourceRequest
29 de abril de 2010 8:52
Respuesta

PortletFaces Community Member

Ranking: Regular Member

Mensajes: 201

Fecha de incorporación: 2 de abril de 2012

Mensajes recientes

Finally I found the exception thrown by glassfish v3:

org.portletfaces.bridge.BridgeException: javax.faces.FacesException: Weld doesn not support using JSF in an non-servlet environment
at BridgeImpl.java.doFacesRequest(BridgeImpl.java:169)
at org.portletfaces.bridge.GenericFacesPortlet.doView(GenericFacesPortlet.java:194)
...
Caused by: javax.faces.FacesException: Weld doesn not support using JSF in an non-servlet environment
at com.sun.faces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:136)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:115)
...
Caused by: java.lang.IllegalStateException: Weld doesn not support using JSF in an non-servlet environment
at org.jboss.weld.jsf.JsfHelper.getModuleBeanManager(JsfHelper.java:119)
at org.jboss.weld.jsf.WeldPhaseListener.initiateSessionAndConversation(WeldPhaseListener.java:168)

I think it is quite self explaining.
Neil Griffin
RE: exception in ResourceHandlerImpl.handleResourceRequest
29 de abril de 2010 9:57
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2055

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

OK I have a friend that is helping with Weld maintenance issues. I'll ask him about it and see what he says.
Neil Griffin
RE: exception in ResourceHandlerImpl.handleResourceRequest
29 de abril de 2010 12:12
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2055

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

The folks at JBoss asked me to file an issue for Weld:
https://jira.jboss.org/jira/browse/WELD-510
Neil Griffin
RE: exception in ResourceHandlerImpl.handleResourceRequest
5 de agosto de 2010 10:51
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2055

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

FYI, it is my best understanding that JBoss will be fixing https://jira.jboss.org/jira/browse/WELD-510 in Weld 1.1 (September 2010).
Neil Griffin
RE: exception in ResourceHandlerImpl.handleResourceRequest
8 de mayo de 2012 16:13
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2055

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

For updates on CDI/Weld integration with Liferay Faces Bridge, please refer to FACES-1211.