QeelwaEtech / omnifaces

Automatically exported from code.google.com/p/omnifaces
0 stars 1 forks source link

com.liferay.portlet.PortletContextImpl cannot be cast to javax.servlet.ServletContext #148

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In liferay portal, when I have a dropdown like this: <h:selectOneMenu 
class="val" id="val" value="#{myBean.myValue}" required="true" 
converter="omnifaces.SelectItemsConverter"> ...
2. and I update from another component
3. get an exception

What is the expected output? What do you see instead?

The component should be updated, but I get an exception:

java.lang.ExceptionInInitializerError: null
    at org.omnifaces.context.OmniPartialViewContext$OmniPartialResponseWriter.startDocument(OmniPartialViewContext.java:253)
    at org.primefaces.context.PrimePartialResponseWriter.startDocument(PrimePartialResponseWriter.java:133)
    at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:285)
... (long liferay trace)
Caused by: java.lang.RuntimeException: java.lang.ClassCastException: 
com.liferay.portlet.PortletContextImpl cannot be cast to 
javax.servlet.ServletContext
    at org.omnifaces.config.WebXml.<init>(WebXml.java:89)
    at org.omnifaces.config.WebXml.<clinit>(WebXml.java:53)
    ... 145 common frames omitted
Caused by: java.lang.ClassCastException: com.liferay.portlet.PortletContextImpl 
cannot be cast to javax.servlet.ServletContext
    at org.omnifaces.util.Faces.getServletContext(Faces.java:1249)
    at org.omnifaces.config.WebXml.loadAllWebXml(WebXml.java:158)
    at org.omnifaces.config.WebXml.<init>(WebXml.java:83)
    ... 146 common frames omitted

What OmniFaces version are you using? What JSF impl/version are you using?
What servletcontainer impl/version are you using? If any, what JSF
component library impl/version are you using?

omnifaces 1.3
portletfaces-bridge 2.0.2
primefaces 3.4
liferay 6.1.1-ce-ga2
tomcat 7.0.27

Please provide any additional information below.

With 1.1 it works.

Original issue reported on code.google.com by r...@al.pmmf.hu on 4 Mar 2013 at 9:38

GoogleCodeExporter commented 9 years ago
OmniFaces is not designed with portlet webapps in mind. OmniFaces is only 
designed for servlet webapps. This is covered in the last sentence of the 3rd 
paragraph of the homepage: https://code.google.com/p/omnifaces/

Original comment by balusc on 4 Mar 2013 at 10:53