2014-08-29 30 views
0

我有這在我的駱駝cxf.xml文件:在FuseESB部署JAR得到ClassNotFoundException的

<bean id="configFile" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer"> 
     <property name="location" value="file:${karaf.home}/etc/test.cfg"/> 
</bean> 

test.cfg是存在的。我的pom.xml包含以下內容,它解析爲版本2.12.0.redhat-610379:

<dependency> 
    <groupId>org.apache.camel</groupId> 
    <artifactId>camel-spring</artifactId> 
</dependency> 

這一切都編譯得很好。但是,當我在保險絲的部署文件夾拖放,我得到:

Caused by: java.lang.ClassNotFoundException: org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer not found by myService [257] 
     at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532) 

所以我相信這不是有我的OSGi駱駝/春天,但現在我已經做了「的特點:安裝X」駱駝的每一個可能的變化和春天,它不會改變任何東西。

有誰知道我錯過了什麼?

回答

1

我認爲你需要導入org.apache.camel.spring.spi的包在你的包。

+0

我導入駱駝春天已經在pom ...如果我看着maven jar,它有org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer(.class) – djb 2014-09-01 09:24:09

+0

不,你需要更新捆綁清單爲它的文件。請看看camel-example-osgi,maven bundle插件可以幫助您生成正確的軟件包清單。 – 2014-09-02 03:36:19

+0

嗯,沒有運氣。我從camel-example-osgi中添加了build-helper-maven-plugin和features.xml。然後我得到:「未找到java.lang.ClassNotFoundException:org.apache.camel.Processor」。明天我會繼續努力。 – djb 2014-09-02 15:07:31

相關問題