Hi Please read this wiki page http://camel.apache.org/support
How do you think anyone want/can help you when you dont even detail information about - versions of software used - container used - how you start it - did it work before, did you upgrade something - JDK version And did you look in the stacktrace / logging what it says? camel-osgi.jar/camel-spring-osgi.jar not detected in classpath This indicate you have a classpath issues of some sort. A needed bundle is not installed. On Fri, Sep 17, 2010 at 8:50 PM, Bingliu <liubing1...@gmail.com> wrote: > > When i use camel with osgi, the camel throws an exception. please look this: > 2010 九月 18 02:34:44 3114 INFO [SpringOsgiExtenderThread-1] > org.apache.camel.spring.handler.CamelNamespaceHandler - > camel-osgi.jar/camel-spring-osgi.jar not detected in classpath > 2010 九月 18 02:34:44 3123 DEBUG [SpringOsgiExtenderThread-1] > org.apache.camel.spring.handler.CamelNamespaceHandler - Using > org.apache.camel.spring.CamelContextFactoryBean as > CamelContextBeanDefinitionParser > 2010 九月 18 02:34:46 5039 DEBUG [SpringOsgiExtenderThread-1] > org.apache.camel.spring.handler.CamelNamespaceHandler - Registered > default: org.apache.camel.spring.CamelProducerTemplateFactoryBean with id: > template on camel context: camelContext > 2010 九月 18 02:34:46 5041 DEBUG [SpringOsgiExtenderThread-1] > org.apache.camel.spring.handler.CamelNamespaceHandler - Registered > default: org.apache.camel.spring.CamelConsumerTemplateFactoryBean with id: > consumerTemplate on camel context: camelContext > 2010 九月 18 02:34:46 5854 DEBUG [SpringOsgiExtenderThread-2] > org.apache.camel.spring.SpringCamelContext - Set the application context > classloader to: BundleDelegatingClassLoader for [Business > (com.jbsoft.business)] > 2010 九月 18 02:34:46 5932 DEBUG [SpringOsgiExtenderThread-2] > org.apache.camel.spring.CamelContextFactoryBean - Found JAXB created > routes: [Route[[From[direct:demo]] -> > [To[bean:queryAccInfoByAccno?method=process], > To[direct:demochoice12715534]]], Route[[From[direct:demochoice12715534]] -> > [Choice[[When[simple{${in.body[accinfo_accno_count]} != 0} -> > [To[bean:queryChgAccByAccno?method=process], To[direct:demochoice7721332]]]] > Otherwise[[]]]]], Route[[From[direct:demochoice7721332]] -> > [Choice[[When[simple{${in.body[chg_cur_acc_count]} != 0} -> > [To[bean:queryRsDrawByAccno?method=process], > To[direct:demochoice29867746]]]] Otherwise[[]]]]], > Route[[From[direct:demochoice29867746]] -> > [Choice[[When[simple{${in.body[chg_typrsdraw]} == 2} -> > [To[bean:insertAmt?method=process]]]] Otherwise[[]]]]]] > 2010 九月 18 02:34:47 6381 DEBUG [SpringOsgiExtenderThread-2] > org.apache.camel.spring.SpringCamelContext - onApplicationEvent: > org.springframework.context.event.ContextRefreshedEvent[source=OsgiBundleXmlApplicationContext(bundle=com.jbsoft.business, > config=osgibundle:/META-INF/spring/*.xml): startup date [Sat Sep 18 02:34:42 > CST 2010]; root of context hierarchy] > 2010 九月 18 02:34:47 6382 INFO [SpringOsgiExtenderThread-2] > org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.3.0 > (CamelContext: camelContext) is starting > 2010 九月 18 02:34:47 6382 INFO [SpringOsgiExtenderThread-2] > org.apache.camel.impl.DefaultCamelContext - JMX enabled. Using > ManagedManagementStrategy. > 2010 九月 18 02:34:47 6639 DEBUG [SpringOsgiExtenderThread-2] > org.apache.camel.management.DefaultManagementAgent - Starting JMX agent > on server: com.sun.jmx.mbeanserver.jmxmbeanser...@91d7c > 2010 九月 18 02:34:47 6797 DEBUG [SpringOsgiExtenderThread-2] > org.apache.camel.management.DefaultManagementAgent - Registered MBean > with objectname: > org.apache.camel:context=bing-PC/camelContext,type=context,name="camelContext" > 2010 九月 18 02:34:47 6901 DEBUG [SpringOsgiExtenderThread-2] > org.apache.camel.management.DefaultManagementAgent - Registered MBean > with objectname: > org.apache.camel:context=bing-PC/camelContext,type=services,name=DefaultTypeConverter(0x13f16b4) > 2010 九月 18 02:34:47 6901 DEBUG [SpringOsgiExtenderThread-2] > org.apache.camel.impl.converter.DefaultTypeConverter - Loading type > converters ... > 2010 九月 18 02:34:47 6902 INFO [SpringOsgiExtenderThread-2] > org.apache.camel.impl.converter.AnnotationTypeConverterLoader - Loading > file META-INF/services/org/apache/camel/TypeConverter to retrieve list of > packages, from url: > bundleresource://93.fwk15020296/META-INF/services/org/apache/camel/TypeConverter > 2010 九月 18 02:34:47 6906 DEBUG [SpringOsgiExtenderThread-2] > org.apache.camel.impl.DefaultPackageScanClassResolver - Searching for > annotations of org.apache.camel.Converter in packages: > [org.apache.camel.component.file, org.apache.camel.component.bean, > org.apache.camel.converter] > 2010 九月 18 02:34:47 6924 DEBUG [SpringOsgiExtenderThread-2] > org.apache.camel.impl.DefaultPackageScanClassResolver - Cannot read > entries in url: > bundleresource://93.fwk15020296/org/apache/camel/component/file/ > java.io.FileNotFoundException: \org\apache\camel\component\file (The system > cannot find the path specified) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.<init>(FileInputStream.java:106) > at > org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:273) > at > org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:180) > at > org.apache.camel.impl.DefaultPackageScanClassResolver.findAnnotated(DefaultPackageScanClassResolver.java:100) > at > org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:64) > at > org.apache.camel.impl.converter.DefaultTypeConverter.loadTypeConverters(DefaultTypeConverter.java:378) > at > org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:402) > at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56) > at > org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:53) > at > org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1191) > at > org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:604) > at > org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:676) > at > org.apache.camel.impl.DefaultCamelContext.forceLazyInitialization(DefaultCamelContext.java:1240) > at > org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1097) > at > org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1037) > at > org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:164) > at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56) > at > org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:912) > at > org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203) > at > org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101) > at > org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:665) > at > org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97) > at > org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:301) > at > org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888) > at > org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235) > at > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358) > at > org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) > at > org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320) > at > org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132) > at java.lang.Thread.run(Thread.java:619) > > What is the cause of the problem? How can solve the problem? > thanks > -- > View this message in context: > http://camel.465427.n5.nabble.com/An-camel-s-exception-with-osgi-tp2844157p2844157.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus