2012-05-08 37 views
0

我的問題是我怎麼能強制捆綁使用包裝春天的版本它,而不是安裝在ESB版本?不兼容的版本部署到保險絲ESB時(ServiceMix的4.4.1熔絲-03-06)

我有我試圖安裝和保險絲ESB啓動一個簡單的Web服務WAR。 WAR依賴於Spring 3.0.6,我在ESB中安裝了Spring 3.0.5特性。安裝並嘗試啓動軟件包後,出現以下錯誤。

22:24:43869 |錯誤| l控制檯線程| RegisterWebAppVisitorWC | 163 - org.ops4j.pax.web.pax-web-extender-war - 1.0.3 |註冊異常。跳繩。 org.springframework.beans.factory.parsing.BeanDefinitionParsingException:配置問題:無法導入從URL位置bean定義[classpath中:META-INF /春/ APP-context.xml中] 犯規資源:ServletContext的資源[/ WEB-INF /cxf-servlet.xml];嵌套異常是org.springframework.beans.factory.BeanDefinitionStoreException:從類路徑資源意外異常解析XML文檔[META-INF /彈簧/ APP-context.xml中];嵌套異常是org.springframework.beans.FatalBeanException:類[org.springframework.jdbc.config.JdbcNamespaceHandler用於命名空間[http://www.springframework.org/schema/jdbc]不實現[org.springframework.beans .factory.xml.NamespaceHandler]接口 在org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[73:org.springframework.beans:3.0.5.RELEASE]

這表明正在使用Spring的意外版本。我可以看到3.0.6在Bundle-Classpath上。我原以爲這個bundle只能在bundle lib文件夾中使用Spring的版本。

我也有這個pom配置,以便在將WAR部署到ServiceMix時,Maven依賴包括在類路徑中。

   <plugin> 
       <artifactId>maven-war-plugin</artifactId> 
       <configuration> 
        <archive> 
         <manifest> 
          <addClasspath>true</addClasspath> 
          <classpathPrefix>lib/</classpathPrefix> 
          <classpathLayoutType>repository</classpathLayoutType> 
         </manifest> 
        </archive> 
        <webXml>src/main/webapp/WEB-INF/web.xml</webXml> 
        <webResources> 
         <resource> 
          <directory>src/main/resources</directory> 
          <targetPath>WEB-INF</targetPath> 
          <includes> 
           <include>**.*</include> 
          </includes> 
         </resource> 
        </webResources> 
       </configuration> 
      </plugin> 

回答

0

束類路徑由導入-軟件包從MANIFEST.MF,而不是/ lib文件夾中定義。您可能需要將Maven-Bundle-Plugin配置爲使用Spring 3.0.6。

+0

好的,謝謝,我可以更改爲使用maven-bundle-plugin,我相信這是將服務部署到ESB的正確方法,但是我想探索將WAR作爲WAR進行打包和安裝,因爲Fuse確實提供了該功能。 –