voyent
Liferay + Icefaces HelloWorld  XML
Forum Index -> Portals & Portlets
Author Message
FF_CID

Joined: 30/Sep/2008 00:00:00
Messages: 3
Offline


Hi, I'm new in these technologies and I've started deploying this .war (http://www.icefaces.org/JForum/posts/list/15/3155.page).

But it throws these exceptions when i try to show the portlets

javax.servlet.ServletException: java.lang.ClassCastException: org.apache.catalina.session.StandardSessionFacade cannot be cast to javax.portlet.PortletSession
com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:437)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

java.lang.ClassCastException: org.apache.catalina.session.StandardSessionFacade cannot be cast to javax.portlet.PortletSession
com.sun.faces.portlet.LifecycleImpl.restore(LifecycleImpl.java:376)
com.sun.faces.portlet.LifecycleImpl.execute(LifecycleImpl.java:196)
com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:401)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


any ideas?

Thanks
petar_b


Joined: 05/Jun/2008 00:00:00
Messages: 74
Offline


Maybe this helps, I am not sure, I need more trace !

http://support.liferay.com/browse/LEP-6569

FF_CID

Joined: 30/Sep/2008 00:00:00
Messages: 3
Offline


Full trace:

11:42:56,125 ERROR - Exception executing lifecycle or setting up persistent context. org.apache.catalina.session.StandardSessionFacade cannot be cast to javax.portlet.PortletSession java.lang.ClassCastException: org.apache.catalina.session.StandardSessionFacade cannot be cast to javax.portlet.PortletSession
at
com.sun.faces.portlet.LifecycleImpl.restore(LifecycleImpl.java:376)
at com.sun.faces.portlet.LifecycleImpl.execute(LifecycleImpl.java:196)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:401)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)


11:42:56,125 ERROR com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(433) - Exception executing lifecycle or setting up persistent context. org.apache.catalina.session.StandardSessionFacade cannot be cast to javax.portlet.PortletSession java.lang.ClassCastException: org.apache.catalina.session.StandardSessionFacade cannot be cast to javax.portlet.PortletSession
at com.sun.faces.portlet.LifecycleImpl.restore(LifecycleImpl.java:376)
at com.sun.faces.portlet.LifecycleImpl.execute(LifecycleImpl.java:196)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:401)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)



Thanks
petar_b


Joined: 05/Jun/2008 00:00:00
Messages: 74
Offline


Sorry, don't know....
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


That example is extremely old. There have been a lot of changes in the ICEfaces framework to support portlets since then. I recommend running a different example. ICEfaces doesn't come with a HelloWorld portlet but it does come with a fairly simple chat example.

You can find it in [icefaces.dir]/samples/portlet/chat. From the command line, go to [icefaces.dir]/samples/portlet/chat then type:

Code:
ant clean build.portlet.liferay.tomcat6.war


You can also type:

Code:
ant -p


to see other targets if you are not running Liferay with Tomcat 6.

This should build a chat.war file that can be deployed to Liferay. It contains a portlet with a single portlet where you can login and chat. You can put multiple instances on a page or open up 2 different browsers and chat between them.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
thorne

Joined: 10/Jun/2008 00:00:00
Messages: 12
Offline


Hi,

I have a problem as well but my ClassCastException doesn't say what it resolves to. What I did was extend the MainPortlet class that ICEfaces provides and implemented the doView method. Now when I deploy the portlet I get the following error:

Caused by: java.lang.ClassCastException: com.novell.portlet.Portlet
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:368)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:229)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:113)


Any advice?

All good things lead to more good things
[Email]
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


Could you post or attach the code for your extended class?

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team