The personal site of Grahame Murray

Email me:
blog [@] grahame.com

Categories

Calendar
August 2003
S M T W T F S
« Jul   Sep »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Recent Comments

Powered by WordPress
RSS Utilities [Java]
My friend Rodrigo just told me that he has an article on java.sun.com about the RSS Utility JSP tag library he wrote for Sun during his last contract there. It is a fairly short article, but it is a pretty well formed utility that I would imagine could be useful to a number of organizations. It basically lets you format and display RSS derived data in any JSP page. This taglib should save you the step of parsing RSS (XML) and displaying its contents. Way to go Rodrigo!

9 Responses to “RSS Utilities”

  1. Tat Leung Says:

    I have RSS Utilities deployed and got the following exception:

    guid>


    INFO: skipDays does not exist or method signature is incorrect
    java.lang.NoSuchMethodException: com.sun.cnpi.rss.elements.Item.setSkipDays(com.sun.cnpi.rss.elements.Author)
    at java.lang.Class.getMethod(Class.java:978)
    at com.sun.cnpi.rss.handlers.DefaultElementHandler.startElement(DefaultElementHandler.java:116)
    at com.sun.cnpi.rss.handlers.DocumentHandler.startElement(DocumentHandler.java:98)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at com.sun.cnpi.rss.parser.RssParserImpl.parse(RssParserImpl.java:63)
    at com.sun.cnpi.rss.parser.RssParserImpl.parse(RssParserImpl.java:100)
    at com.sun.cnpi.rss.taglib.FeedTag.doStartTag(FeedTag.java:121)
    at org.apache.jsp.home.index_jsp._jspx_meth_rss_feed_1(index_jsp.java:409)
    at org.apache.jsp.home.index_jsp._jspService(index_jsp.java:141)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
    at org.apache.coyote.http11.Http11Protocol.processConnection(Http11Protocol.java:696)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
    at org.apache.tomcat.util.threads.ThreadPool.run(ThreadPool.java:677)
    at java.lang.Thread.run(Thread.java:534)




    <br />



    I am using Tomcat 5.0.16 and JDK 1.4.2_03. Anyone know what may be causing this? Is the source for the tag library available?

    Thanks for your help!!

  2. satish Says:

    Hi,
    I was trying out the rssutils from java.net

    Im not sure whether im writing to correct person, but im geting unwanted verbose of all the tags which are parsed
    like etc in my server console as well as log.

    can you help me out on this as how to remove that verbose

    thanks in advance

  3. Tim Says:

    I’m getting the same exception and verbose info as well. Any way to configure this taglib or source available.

  4. rssjavaguy Says:

    check if you have your xerces parser installed (look for it), laso check if your tomcat server is up and running, in the example above the skipDays method doesn’t exist, the class that implements it is not imported or has a bad implemenatation signature.

    BTW does anyone knows where can i find the java doc for the rssutils.jar file?.

  5. Sam Sarmad Says:

    I started gettting similar errors albeit with a null pointer exception thrown for ForEachItemTag. After eliminating application and library integrity errors, It dawned on me the RSS feed may have been upgraded and that is what it was. Make sure your RSS source did not got from 0.91 -> 0.92 -> 2.0.

  6. jimmy Says:

    i alse have this problem ,hope someone can help us.

  7. Andrew Chen Says:

    Don’t know if anybody still cares about this topic, but I got this error too. I fixed it by decompiling com/sun/cnpi/rss/handlers/DocumentHandlerFactory.class

    The line:

    docHandler.registerHandler(“author”, new DefaultElementHandler((com.sun.cnpi.rss.elements.Author.class).getName(), “skipDays”));

    should be corrected to:

    docHandler.registerHandler(“author”, new DefaultElementHandler((com.sun.cnpi.rss.elements.Author.class).getName(), “author”));

  8. Karthik Says:

    Hi Andrew Chen,

    Can u provide me the updated jar file

  9. Hilar Says:

    Hi there,

    was fighting with these exceptions and tag outputs as well. I finally got rid of them (doing like described above for the DocumentHandlerFactory and removing the System.out.println’s in DocumentHandler). You can find an updated JAR at http://hilar.ch/div/rssutils.jar.

    Regards, Hilar.