primefacesrome

p:feedReader noclassdeffound exception


I am trying to create a simple RSS reader in JSF web project (Eclipse).

Here is Primefaces snippet for RSS:

    <h:panelGrid>
    <br/>
<h:outputText styleClass="font1" value="Travel feeds:"/>
<hr/>
<p:feedReader value="http://www.faroo.com/api?q=travel&amp;l=en&amp;src=news&amp;f=rss" var="feed">
    <a href="#{feed.link}" class="link">#{feed.title}</a>
    <h:outputText value="#{feed.description.value}" escape="false"/>
    <p:separator />
</p:feedReader>
</h:panelGrid>

I included this to the very same page:

xmlns:p="http://primefaces.org/ui"

and libraries I included using "Configure build path" are following:

primefaces-6.2-sources.jar, primefaces-6.2.jar, rome-1.0.jar

Also tried to copy them directly to WEB-INF/libfolder, that didn't help either.

So what the actual problem is?

I got exceptions like this:

    exception 
javax.servlet.ServletException: com/rometools/rome/io/XmlReader
    javax.faces.webapp.FacesServlet.service(Unknown Source)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)



root cause 
java.lang.NoClassDefFoundError: com/rometools/rome/io/XmlReader
    org.primefaces.component.feedreader.FeedReaderRenderer.encodeEnd(FeedReaderRenderer.java:35)
    javax.faces.component.UIComponentBase.encodeEnd(Unknown Source)
    com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(Unknown Source)
    com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(Unknown Source)
    com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(Unknown Source)
    javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
    javax.faces.component.UIComponent.encodeAll(Unknown Source)
    javax.faces.component.UIComponent.encodeAll(Unknown Source)
    javax.faces.component.UIComponent.encodeAll(Unknown Source)
    com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(Unknown Source)
    com.sun.faces.application.view.MultiViewHandler.renderView(Unknown Source)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(Unknown Source)
    com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.render(Unknown Source)
    javax.faces.webapp.FacesServlet.service(Unknown Source)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)



root cause 
java.lang.ClassNotFoundException: com.rometools.rome.io.XmlReader
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1856)
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1705)
    org.primefaces.component.feedreader.FeedReaderRenderer.encodeEnd(FeedReaderRenderer.java:35)
    javax.faces.component.UIComponentBase.encodeEnd(Unknown Source)
    com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(Unknown Source)
    com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(Unknown Source)
    com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(Unknown Source)
    javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
    javax.faces.component.UIComponent.encodeAll(Unknown Source)
    javax.faces.component.UIComponent.encodeAll(Unknown Source)
    javax.faces.component.UIComponent.encodeAll(Unknown Source)
    com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(Unknown Source)
    com.sun.faces.application.view.MultiViewHandler.renderView(Unknown Source)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(Unknown Source)
    com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
    com.sun.faces.lifecycle.LifecycleImpl.render(Unknown Source)
    javax.faces.webapp.FacesServlet.service(Unknown Source)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)



note The full stack trace of the root cause is available in the Apache Tomcat/7.0.67 logs.

Really can't find a solution to this. What have I missed here? I didn't include needed .jar files or I included them the wrong way?


Solution

  • The solution to this PrimeFaces 6.2 issue mentioned in the PrimeFaces issuelist

    In the PrimeFaces documentation:

    In the migration info:

    You need a newer version of Rome, 1.5.0 instead of 1.0!