9 Replies Latest reply on May 2, 2012 4:53 AM by Massimo Pichini

    Problem using camel-atom in FUSE ESB

    Massimo Pichini Newbie

      Hello,

       

      I'm trying to use camel-atom component on fuse distribution of apache servicemix (version 4.4.1 fuse-03-06). I've installed the camel-atom feature that installed also the Abdera 1.1.2 atom parser.

      I got the following class not found exception:

       

      14:42:46,878 | WARN  | ap/wwacapget.php | faultPollingConsumerPollStrategy | 88 - org.apache.camel.camel-core - 2.8.0.fuse-03-06 | Consumer Consumer[atom://http://alerts.weather.gov/cap/wwacapget.php?consumer.delay=60000&x=0] could not poll endpoint: Endpoint[atom://http://alerts.weather.gov/cap/wwacapget.php?consumer.delay=60000&x=0] caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.abdera.parser.stax.FOMParser not found from bundle

      java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.abdera.parser.stax.FOMParser not found from bundle

           at org.apache.abdera.util.Discover.locate(Discover.java:37)[215:org.apache.abdera.core:1.1.2]

           at org.apache.abdera.util.Discover.locate(Discover.java:21)[215:org.apache.abdera.core:1.1.2]

           at org.apache.abdera.util.AbderaConfiguration.newParserInstance(AbderaConfiguration.java:298)[215:org.apache.abdera.core:1.1.2]

           at org.apache.abdera.Abdera.newParser(Abdera.java:215)[215:org.apache.abdera.core:1.1.2]

           at org.apache.abdera.Abdera.getParser(Abdera.java:150)[215:org.apache.abdera.core:1.1.2]

           at org.apache.camel.component.atom.AtomUtils.getAtomParser(AtomUtils.java:42)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

           at org.apache.camel.component.atom.AtomUtils.parseDocument(AtomUtils.java:55)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

           at org.apache.camel.component.atom.AtomEntryPollingConsumer.getDocument(AtomEntryPollingConsumer.java:52)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

           at org.apache.camel.component.atom.AtomEntryPollingConsumer.createFeed(AtomEntryPollingConsumer.java:77)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

           at org.apache.camel.component.feed.FeedEntryPollingConsumer.poll(FeedEntryPollingConsumer.java:46)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

           at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:138)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

           at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:90)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_30]

           at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_30]

           at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_30]

           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_30]

           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_30]

           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_30]

           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_30]

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_30]

           at java.lang.Thread.run(Thread.java:662)[:1.6.0_30]

      Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.abdera.parser.stax.FOMParser not found from bundle

           at org.apache.abdera.util.Discover.getClass(Discover.java:162)[215:org.apache.abdera.core:1.1.2]

           at org.apache.abdera.util.Discover.load(Discover.java:143)[215:org.apache.abdera.core:1.1.2]

           at org.apache.abdera.util.Discover.locate(Discover.java:33)[215:org.apache.abdera.core:1.1.2]

           ... 20 more

      Caused by: java.lang.ClassNotFoundException: org.apache.abdera.parser.stax.FOMParser not found from bundle

           at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)[81:org.springframework.osgi.core:1.2.1]

           at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)[81:org.springframework.osgi.core:1.2.1]

           at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_30]

           at org.apache.abdera.util.Discover.getClass(Discover.java:159)[215:org.apache.abdera.core:1.1.2]

           ... 22 more

      Caused by: java.lang.ClassNotFoundException: org.apache.abdera.parser.stax.FOMParser not found by ness-dr-so115

           at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:845)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]

           at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:74)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]

           at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1839)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]

           at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_30]

           at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:703)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]

           at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1624)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]

           at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:909)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]

           at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)[81:org.springframework.osgi.core:1.2.1]

           ... 25 more

       

       

      Any idea ?

      Best Regards

       

      Massimo

        • 1. Re: Problem using camel-atom in FUSE ESB
          Claus Ibsen Master

          Have you tried restarting the ESB server?

          • 2. Re: Problem using camel-atom in FUSE ESB
            Massimo Pichini Newbie

            Yes, I resatarted the ESB server. Actually I also tried using the Apache version and a older release (4.3.15), but I always get the same error.

            • 4. Re: Problem using camel-atom in FUSE ESB
              Freeman(Yue) Fang Master

              Hi,

               

              You can do

              install -s mvn:org.apache.abdera/abdera-parser/1.1.2

              before install your ness-dr-so115 bundle,  this should help.

               

              Freeman

              • 5. Re: Problem using camel-atom in FUSE ESB
                Massimo Pichini Newbie

                Thanks for the reply,

                 

                I installed the Abdera Parse bundle, but then I got the error:

                 

                java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/axiom/om/util/StAXParserConfiguration

                 

                so I downloaded and installed the axiom bundles:

                 

                install -s mvn:org.apache.ws.commons.axiom/axiom-api/1.2.13

                install -s mvn:org.apache.ws.commons.axiom/axiom-impl/1.2.13

                 

                and also

                install -s mvn:org.apache.james/apache-mime4j-core/0.7.2

                because it was required by axiom-api

                 

                Now I got the following ClassCastException when axiom-api is started:

                 

                ERROR: Bundle org.apache.ws.commons.axiom.axiom-api EventDispatcher: Error during dispatch. (java.lang.ClassCastException: org

                .apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactoryLoader cannot be cast to org.apache.axiom.locator.loader.OMMetaFactoryLoad

                er)

                java.lang.ClassCastException: org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactoryLoader cannot be cast to org.apache.axiom

                .locator.loader.OMMetaFactoryLoader

                        at org.apache.axiom.locator.ImplementationFactory.parseImplementation(ImplementationFactory.java:124)

                        at org.apache.axiom.locator.ImplementationFactory.parseDescriptor(ImplementationFactory.java:87)

                        at org.apache.axiom.locator.OSGiOMMetaFactoryLocator.addingBundle(OSGiOMMetaFactoryLocator.java:51)

                        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:440)

                        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)

                        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)

                        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:413)

                        at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:795)

                        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:717)

                        at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:597)

                        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3781)

                        at org.apache.felix.framework.Felix.startBundle(Felix.java:1792)

                        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)

                        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:914)

                        at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:54)

                        at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)

                        at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)

                        at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)

                        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)

                        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)

                        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)

                        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)

                        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)

                        at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)

                        at org.apache.karaf.shell.console.jline.Console.run(Console.java:240)

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

                • 6. Re: Problem using camel-atom in FUSE ESB
                  Freeman(Yue) Fang Master

                  Hi,

                   

                  Try with

                  install -s mvn:org.apache.ws.commons.axiom/axiom-api/1.2.10

                  install -s mvn:org.apache.ws.commons.axiom/axiom-impl/1.2.10

                  instead

                   

                  Freeman

                  • 7. Re: Problem using camel-atom in FUSE ESB
                    Massimo Pichini Newbie

                    Hello Freeman,

                     

                    tried with 1.2.10, but I got the initial error:

                     

                     

                    9:57:31,916 | WARN  | ap/wwacapget.php | faultPollingConsumerPollStrategy | 88 - org.apache.camel.camel-core - 2.8.0.fuse-03-06 | Consumer Consumer[atom://http://alerts.weather.gov/cap/wwacapget.php?consumer.delay=60000&x=0] could not poll endpoint: Endpoint[atom://http://alerts.weather.gov/cap/wwacapget.php?consumer.delay=60000&x=0] caused by: java.lang.NoClassDefFoundError: org/apache/axiom/om/util/StAXParserConfiguration

                    java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/axiom/om/util/StAXParserConfiguration

                         at org.apache.abdera.util.Discover.locate(Discover.java:37)[215:org.apache.abdera.core:1.1.2]

                         at org.apache.abdera.util.Discover.locate(Discover.java:21)[215:org.apache.abdera.core:1.1.2]

                         at org.apache.abdera.util.AbderaConfiguration.newParserInstance(AbderaConfiguration.java:298)[215:org.apache.abdera.core:1.1.2]

                         at org.apache.abdera.Abdera.newParser(Abdera.java:215)[215:org.apache.abdera.core:1.1.2]

                         at org.apache.abdera.Abdera.getParser(Abdera.java:150)[215:org.apache.abdera.core:1.1.2]

                         at org.apache.camel.component.atom.AtomUtils.getAtomParser(AtomUtils.java:42)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

                         at org.apache.camel.component.atom.AtomUtils.parseDocument(AtomUtils.java:55)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

                         at org.apache.camel.component.atom.AtomEntryPollingConsumer.getDocument(AtomEntryPollingConsumer.java:52)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

                         at org.apache.camel.component.atom.AtomEntryPollingConsumer.createFeed(AtomEntryPollingConsumer.java:77)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

                         at org.apache.camel.component.feed.FeedEntryPollingConsumer.poll(FeedEntryPollingConsumer.java:46)[214:org.apache.camel.camel-atom:2.8.0.fuse-03-06]

                         at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:138)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

                         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:90)[88:org.apache.camel.camel-core:2.8.0.fuse-03-06]

                         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_30]

                         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_30]

                         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_30]

                         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_30]

                         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_30]

                         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_30]

                         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_30]

                         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_30]

                         at java.lang.Thread.run(Thread.java:662)[:1.6.0_30]

                    Caused by: java.lang.NoClassDefFoundError: org/apache/axiom/om/util/StAXParserConfiguration

                         at java.lang.Class.getDeclaredConstructors0(Native Method)[:1.6.0_30]

                         at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)[:1.6.0_30]

                         at java.lang.Class.getConstructor0(Class.java:2699)[:1.6.0_30]

                         at java.lang.Class.getConstructor(Class.java:1657)[:1.6.0_30]

                         at org.apache.abdera.util.Discover.load(Discover.java:149)[215:org.apache.abdera.core:1.1.2]

                         at org.apache.abdera.util.Discover.locate(Discover.java:33)[215:org.apache.abdera.core:1.1.2]

                         ... 20 more

                    Caused by: java.lang.ClassNotFoundException: org.apache.axiom.om.util.StAXParserConfiguration not found by org.apache.abdera.parser

                         at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:845)

                         at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:74)

                         at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1839)

                         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_30]

                         ... 26 more

                     

                    Massimo

                    • 8. Re: Problem using camel-atom in FUSE ESB
                      Freeman(Yue) Fang Master

                      Hi,

                       

                      Ok, seems you run into a known abdera issue[1], however this was fixed for abdera 1.2 but not get released so far, the latest abdera version is 1.1.2. So probably you can build a abdera-parser bundle yourself which have the ABDERA-281 fix. Or if you're fuse subscriber, use that channel to contact us.

                       

                      https://issues.apache.org/jira/browse/ABDERA-281

                       

                       

                      Freeman

                      • 9. Re: Problem using camel-atom in FUSE ESB
                        Massimo Pichini Newbie

                        Hi Freeman,

                         

                        thank you very much for your support.

                        I'll try to build an abdera parser bundle by myself

                         

                        best regards

                        Massimo