-
15. Re: JSF 1.2 + RichFaces in Portlet
suckerd Sep 27, 2007 8:02 AM (in response to viggo.navarsete)...ok please provide feedback as this is a very experimental domain - i got it working with a richfaces 3.0.1_SNAPSHOT
with the current version i needed to patch the first page to load the A4J script - and it only works if the whole page renders normal - then an ajax request is processed - if you use some a4j features on the first page you get exceptions :(
But this behaviour is new to richfaces3.1.0 - maybe I'll up a war + submit a bug.
CU Mike -
16. Re: JSF 1.2 + RichFaces in Portlet
viggo.navarsete Sep 27, 2007 8:52 AM (in response to viggo.navarsete)yes, great if you could up a war and submit a bug:)
I've also submitted a bug, RF-572. You could look at it, and perhaps vote for it, and/or add additional information to it. -
17. Re: JSF 1.2 + RichFaces in Portlet
viggo.navarsete Sep 27, 2007 8:54 AM (in response to viggo.navarsete)link to issue: http://jira.jboss.com/jira/browse/RF-572
-
18. Re: JSF 1.2 + RichFaces in Portlet
suckerd Oct 1, 2007 10:56 AM (in response to viggo.navarsete)Hi I uploaded a working war file (at least in JBOSS Portal 2.6.1) you may need some more common-libs and stuff but it should be working everywhere ;)
http://jira.jboss.com/jira/secure/attachment/12316176/portlet-jsfrichfacesdemo.war
the trick is to redefine the ajax-context in the faces-config.xml as its not merged correctly ;)
Have fun,
Mike -
19. Re: JSF 1.2 + RichFaces in Portlet
viggo.navarsete Oct 4, 2007 3:45 AM (in response to viggo.navarsete)thanks suckerd!
Will give it a try :) -
20. Re: JSF 1.2 + RichFaces in Portlet
xalperte Nov 8, 2007 10:40 PM (in response to viggo.navarsete)Hi Mike,
When I deploy your portlet-jsfrichfacesdemo-session.war in a JBoss AS 4.2.1GA, JBoss Portal 2.6.1GA, JDK 1.5.0_12-b14, Linux Kubuntu 7.0 environment, i'm having the next exception,,, do you know why?
04:26:19,426 INFO [TomcatDeployer] deploy, ctxPath=/portlet-jsfrichfacesdemo-session, warUrl=.../tmp/deploy/tmp45375portlet-jsfrichfacesdemo-session-exp.war/
04:26:19,885 INFO [STDOUT] called constructor PortletViewHandler with parent=org.ajax4jsf.application.AjaxViewHandler@131da31
04:26:19,991 ERROR [[/portlet-jsfrichfacesdemo-session]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
Thanks -
21. Re: JSF 1.2 + RichFaces in Portlet
viggo.navarsete Nov 9, 2007 3:20 AM (in response to viggo.navarsete)Good morning xalperte:)
The first thing that slipped into my mind was that you were running classes compiled with a different version of the JDK, and after googling I found something that confirms it:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
(or)
Unsupported major.minor version 49.0
Reason: You are trying to run a class compiled with newer version of JDK. For example, you have compiled the class with JDK 5.0 and try to run on JDK 1.4.2. Class file major/minor version evolves with major JDK releases. Each JDK version supports only upto a specific class file major.minor version.
1. Java SE 6 class file version 50.0 or below
2. JDK 5.0 class file version 49.0 or below
3. JDK 1.4.2 class file version 48.0 or below
While you can run a .class file compiled with past release of JDK, the other way around does not work. You can use javac's -target option. Also, always check version of "java" used to run your program by using -version option. -
22. Re: JSF 1.2 + RichFaces in Portlet
xalperte Nov 9, 2007 4:49 AM (in response to viggo.navarsete)Thanks Viggo. Excuse me for the innocent question.
I was running the server under JDK 1.5.0_12-b14, I tried the JDK 1.6 and now it's starting ok. But now I'm having a problem with the session scoped UserBean. I read in the forum that it was a problem but I don't know if this war (portlet-jsfrichfacesdemo-session.war) is intended to solve this behaviour.
Maybe I'm doing something wrong? It must run on JBoss 4.2.1GA and JBoss Portal 2.6.1GA out-of-the-box? Thanks in advance
The exception thrown is:
javax.faces.FacesException: Prefix for attributes in portlet session scope not found
org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:241)
org.ajax4jsf.portlet.context.ServletContextImpl.getSession(ServletContextImpl.java:311)
org.ajax4jsf.portlet.application.PortletStateHolder.getInstance(PortletStateHolder.java:70)
org.ajax4jsf.portlet.application.PortalStateManager.restoreView(PortalStateManager.java:39)
com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)
com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:310)
org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:116)
org.ajax4jsf.application.AjaxViewHandler.restoreView(AjaxViewHandler.java:159)
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) -
23. Re: JSF 1.2 + RichFaces in Portlet
viggo.navarsete Nov 9, 2007 5:11 AM (in response to viggo.navarsete)I'm actually not sure why you get the exception shown. I haven't looked into the portal stuff for a month because of other urgent needs, but next week I'm picking up the portal-task again to finalize it using the thing mentioned in this thread.
Great to see that other people also look into using JSF + Richfaces in a portal context :)