Just one comments, if you are trying to run the camel on a nonOSGi
environment, you need to remove the camel-osgi from the class path.
Or, you will get the complain about can find OSGi related class.
Willem
Claus Ibsen wrote:
Its called routeBuilderRef now in 2.0
And it looks like you need some osgi.jar in the classpath.
On Wed, Oct 7, 2009 at 7:58 PM, praveen.sharma
<praveen.sha...@ll.mit.edu> wrote:
An example that uses spring configuration to instantiate routes (as shown
below), and that was working with the FUSE_Camel 1.6 fails with Apache Camel
2.0.0. Any ideas why the configuration files are looking for
org/osgi/framework/BundleContext
, and how to fix it.
Error
======----
[pache.camel.spring.Main.main()] CamelNamespaceHandler INFO
camel-osgi .jar detected in classpath
[pache.camel.spring.Main.main()] ClassPathXmlApplicationContext INFO Bean
factory for application context
[org.springframework.context.support.classpathxmlapplicationcont...@68acbd3a]:
org.springframework.beans.factory.support.defaultlistablebeanfact...@561526e3
[pache.camel.spring.Main.main()] DefaultListableBeanFactory INFO
Destroying singletons in
org.springframework.beans.factory.support.defaultlistablebeanfact...@561526e3:
defining beans
[publisherImg,QoSProcessor,template,consumerTemplate,camel:beanPostProcessor,camel,jms];
root of factory hierarchy
[pache.camel.spring.Main.main()] MainSupport INFO Apache
Camel 2.0.0 stopping
[pache.camel.spring.Main.main()] MainSupport ERROR
Failed: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'camel': Initialization of bean failed; nested
exception is java.lang.NoClassDefFoundError:
org/osgi/framework/BundleContext
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'camel': Initialization of bean failed; nested exception is
java.lang.NoClassDefFoundError: org/osgi/framework/BundleContext
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
spring configuration file
================================
<<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<!-- END SNIPPET: e1 -->
<camel:camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<routeBuilder>publisherImg</routeBuilder>
</camel:camelContext>
<camel:camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<routeBuilder>publisherImg</routeBuilder>
</camel:camelContext>
.....
Also, the new version is not even accepting
<routeBuilder>publisherImg</routeBuilder>.
--
View this message in context:
http://www.nabble.com/Example-previously-running-with-IONA-FUSE-Camel-1.6%2C-breaks-with-Apache-Came-2.0.0-tp25791424p25791424.html
Sent from the Camel - Users mailing list archive at Nabble.com.