-
1. Re: JSF 2 with RichFaces 3.3.3.Final on JBoss 6.1.0.
ebross Jul 3, 2012 3:47 AM (in response to mkozeny)hi Martin,
I haven't used Richfaces for a couple of years, but here is what I think about your problem:
It would seem that you have jsf-impl.jar in your Simple5App.war file. But JBoss already contains a copy of the jsf-impl.jar, so there is no need for another copy in your *.war file. The solution is to remove the jsf-impl.jar in your Simple5App.war/WEB-INF/lib before deploying your the *.war.
-
2. Re: JSF 2 with RichFaces 3.3.3.Final on JBoss 6.1.0.
mkozeny Jul 3, 2012 8:42 AM (in response to ebross)Hi ebross,
thanks for your reply, but I have tried this and after that I got the same error from JBoss libraries:
14:37:12,840 SEVERE [compiler] Error Loading Library: vfszip:/C:/Program Files/jboss-5.1.0.GA/server/default/deploy/feisPortal.war/WEB-INF/lib/jsf-impl.jar/com/sun/faces/metadata/taglib/ui.taglib.xml
java.io.IOException: Error parsing [vfszip:/C:/Program Files/jboss-5.1.0.GA/server/default/deploy/feisPortal.war/WEB-INF/lib/jsf-impl.jar/com/sun/faces/metadata/taglib/ui.taglib.xml]:
I don't really what to do, same error occurs when deploying on AS 6.1.0.Final, which use jsf 2 by default.
-
3. Re: JSF 2 with RichFaces 3.3.3.Final on JBoss 6.1.0.
ebross Jul 3, 2012 9:50 AM (in response to mkozeny)Hi Mark,
The error shows that your deployed feisPortal.war still contains a jsf-impl.jar in feisPortal.war/WEB-INF/lib. As I said earlier, you don't need it in the feisPortal.war. You error is probably due to duplicate copies of jsf-impl.jar.
-
4. Re: JSF 2 with RichFaces 3.3.3.Final on JBoss 6.1.0.
mkozeny Jul 3, 2012 10:01 AM (in response to ebross)I am sorry ebross,
I posted bad stacktrace. The error I am getting after removing jsf libraries from my project is following:
15:57:43,554 ERROR [[/feisPortal]] StandardWrapper.Throwable
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
-
5. Re: JSF 2 with RichFaces 3.3.3.Final on JBoss 6.1.0.
ebross Jul 3, 2012 12:14 PM (in response to mkozeny)Ha! You also need to remove "jsf-api.jar" from your /WEB-INF/lib. FacesContextFactory is in this jar.
Sorry I forgot to mention it. Well I did warn you earlier that my Richfaces/JSF is a bit rusty :-)
Alternative solution:
If I remember correctly, in your 'web.xml' you could add the following:
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
If param-value is 'true', then JBoss will use the jsf-impl.jar and jsf-api.jar you have in your /WEB-INF/lib, otherwise it will use it own copies (as in the first Solution). Unless you have a good reason to do this, I would suggest against it. Duplicate jar files will increase the size of your foo.war file.
-
6. Re: JSF 2 with RichFaces 3.3.3.Final on JBoss 6.1.0.
mkozeny Sep 5, 2012 7:43 AM (in response to ebross)Now I've found the solution. Problem was causing library jboss-el-2.0.0.GA.jar and its expression factory defined in deployment descriptor web.xml:
<context-param> <param-name>com.sun.faces.expressionFactory</param-name> <param-value>org.jboss.el.ExpressionFactoryImpl</param-value> </context-param>
But by using this library is possible to use JSF 2 expressions on JBoss 5.1.0.GA, which supports only jsf 1.2.