views:

47

answers:

1

I am trying to get Liferay 6.0, JBoss portlet bridge 2.0 and Richfaces 4.0.0 working together by using the configuration as stated in JBoss Forum and the portlet bridge documentation. My goal is to use JSF 2.0 when implementing protlets.

I use maven for building and deploying the portlet in Liferay and included the Richfaces dependancy like this:

<dependency>
  <groupId>javax.faces</groupId>
  <artifactId>jsf-impl</artifactId>
  <version>2.0.2-FCS</version>
</dependency>
<dependency>
  <groupId>org.jboss.portletbridge</groupId>
  <artifactId>portletbridge-api</artifactId>
  <version>2.0.0.CR1</version>
</dependency>
<dependency>
  <groupId>org.jboss.portletbridge</groupId>
  <artifactId>portletbridge-impl</artifactId>
  <version>2.0.0.CR1</version>
</dependency>
        <dependency>
            <groupId>org.richfaces</groupId>
            <artifactId>richfaces-bom</artifactId>
            <version>4.0.0.20100826-M2</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
<dependency>
  <groupId>com.sun.facelets</groupId>
  <artifactId>jsf-facelets</artifactId>
  <version>1.1.15.B1</version>
</dependency>

But when I use this configuration I get the following error:

 SEVERE: Exception starting filter ajax4jsf
 java.lang.ClassNotFoundException: org.ajax4jsf.Filter
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
  at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:269)
  at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
  at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
  at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
[...]
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

So I looked again at the forum and found this post, which says in my opinion that ajax4jsf does not need any configuration in web.xml and portlet.xml anymore. So I threw it out and got the following error:

[TomcatInstrumentableClassLoader@1738d88] error can't determine annotations of missing type org.ajax4jsf.renderkit.AjaxViewRootRenderer

Now I am confused: Do I have to configure ajax4jsf in web.xml? Why isn't it found by Liferay? And what is this module good for anyway, JSF 2.0 implementation or richfaces proprietary functionality?

A: 

The only version of JBoss Portlet Bridge that supports JSF 2 is in alpha here. You can drop the jar in your lib folder with the 2.0.0.FINAL api jar. Also, there are maven based examples in svn that have a Liferay profile "mvn package -Pliferay".

Wesley Hales
No success, I still get the same error. Do you know, if I have to specify the ajax4jsf filter in web.xml or if I can leave it out?
Bertolt
Also, when I try to compile the project via svn and maven I get the error: "[INFO] The specified web.xml file '/home/bme/Workspace/jboss-portletbridge-3.0.0.ALPHA/examples/jsf2portlet/src/main/liferay/liferay-web.xml' does not exist". Is the web.xml obsolete?
Bertolt