3 Replies Latest reply on Aug 7, 2010 3:00 AM by darkcloudbird

    camel rss issues

    darkcloudbird

      Hi experts,

       

      I am trying to develop a route builder that poll rss feeds and process them. I did the following steps

       

      1. install camel-rss using features:install camel-rss

      - it did not work because the fuse esb is complaining that http://download.java.net/maven/2!rome/rome/1.0 could not be resolved.

       

      2. so i checked the features config file+ FUSE_HOME/system/org/apache/camel/karaf/apache-camel/apache-camel-2.2.0.fuse-01-00-features.xml+ found that it is trying to download the rome bundle required for camel-rss

       

      3. before I looked to manually download the ROME bundle ,but found the issues at http://camel.apache.org/rss.html, saying that there is the ROME 1.1 class loading issues in OSGI enviroment but they have the fixed version for OSGI.

       

      4. so I downloaded ROME, the fixed version for osgi ,and installed manually to my ESB.

       

      5. After rome-osgi is installed, I installed camel-rss downloaded manually from fuse repo

       

      6. I tried to start manually installed camel-rss and esb complained again that missing bundle, so I tried to install camel-atom (features:install)

       

      7. Start camel-rss, ok no complaint for now.

       

      8.install my application to esb and got the following error. ( my application does nothing for now but just poll rss and see how it works.)

       

      11:40:16,171 | FATAL | RssEntryPollingConsumer          | Consumer Consumer[rss://file:C:/cnet.xml] could not poll endpoint: rss://file:C:/cnet.xml caused by : Could not initialize class com.sun.syndication.feed.synd.SyndFeedImpl java.lang.NoClassDefFoundError: Could not initialize class com.sun.syndication.feed.synd.SyndFeedImpl at com.sun.syndication.io.SyndFeedInput.build(SyndFeedInput.java:123) at org.apache.camel.component.rss.RssUtils.createFeed(RssUtils.java:34) at org.apache.camel.component.rss.RssEntryPollingConsumer.createFeed(RssEntryPollingConsumer.java:54) at org.apache.camel.component.feed.FeedEntryPollingConsumer.poll(FeedEntryPollingConsumer.java:42) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:106) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)

      I am running out of fuel now :(. any help would be greatly appreciated. Thanks in advance,

       

       

       

        • 1. Re: camel rss issues
          darkcloudbird

          ok now i restarted the ESb and I got the different exception

           

                     

          12:39:39,968 | FATAL | RssEntryPollingConsumer          | Consumer Consumer[rss://file:C:/cnet.xml] could not poll endpoint: rss://file:C:/cnet.xml caused b

          : null

          java.lang.ExceptionInInitializerError

                  at com.sun.syndication.io.SyndFeedInput.build(SyndFeedInput.java:123)

                  at org.apache.camel.component.rss.RssUtils.createFeed(RssUtils.java:34)

                  at org.apache.camel.component.rss.RssEntryPollingConsumer.createFeed(RssEntryPollingConsumer.java:54)

                  at org.apache.camel.component.feed.FeedEntryPollingConsumer.poll(FeedEntryPollingConsumer.java:42)

                  at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:106)

                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

                  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)

                  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)

                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

                  at java.lang.Thread.run(Thread.java:619)

          Caused by: java.lang.NullPointerException

                  at java.util.Properties$LineReader.readLine(Properties.java:418)

                  at java.util.Properties.load0(Properties.java:337)

                  at java.util.Properties.load(Properties.java:325)

                  at com.sun.syndication.io.impl.PropertiesLoader.(SyndFeedImpl.java:59)

                  ... 14 more

          • 2. Re: camel rss issues
            njiang

            I managed to reproduce your error by not importing the package "com.sun.syndication" in my camel application bundle.

             

            If you take a look at the that package you will find a rome.properties file which tell rome to load the plugins.

             

            So please add the import of  "com.sun.syndication" into your bundle .

            • 3. Re: camel rss issues
              darkcloudbird

              thank you, it is working now. but i had to restart the esb. Thanks a lot