Forum Home » Fuse Distributions » Fuse ESB

Thread: camel rss issues

 

Permlink Replies: 3 - Last Post: Aug 7, 2010 7:00 AM Last Post By: darkcloudbird
darkcloudbird

Posts: 27
Registered: 06/25/10
camel rss issues
Posted: Aug 5, 2010 5:34 AM
  Click to reply to this thread Reply
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 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,
darkcloudbird

Posts: 27
Registered: 06/25/10
Re: camel rss issues
Posted: Aug 5, 2010 6:23 AM   in response to: darkcloudbird in response to: darkcloudbird
  Click to reply to this thread Reply
ok now i restarted the ESb and I got the different exception


12:39:39,968 | FATAL | RssEntryPollingConsumer | Consumer Consumer 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.<init>(PropertiesLoader.java:74)
at com.sun.syndication.io.impl.PropertiesLoader.getPropertiesLoader(PropertiesLoader.java:46)
at com.sun.syndication.io.impl.PluginManager.<init>(PluginManager.java:54)
at com.sun.syndication.io.impl.PluginManager.<init>(PluginManager.java:46)
at com.sun.syndication.feed.synd.impl.Converters.<init>(Converters.java:40)
at com.sun.syndication.feed.synd.SyndFeedImpl.<clinit>(SyndFeedImpl.java:59)
... 14 more

njiang

Posts: 572
Registered: 09/17/07
Re: camel rss issues
Posted: Aug 6, 2010 9:29 AM   in response to: darkcloudbird in response to: darkcloudbird
  Click to reply to this thread Reply
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 .
darkcloudbird

Posts: 27
Registered: 06/25/10
Re: camel rss issues
Posted: Aug 7, 2010 7:00 AM   in response to: njiang in response to: njiang
  Click to reply to this thread Reply
thank you, it is working now. but i had to restart the esb. Thanks a lot