2017-09-16 186 views
0

我想部署一個讀取CSV文件並處理它的駱駝應用程序。我試圖用駱駝bindy來將csv解組到POJO。 駱駝bindy模塊在jboss EAP中不可用,我添加了它。Camel Bindy應用程序JBoss EAP 6.1部署問題

駱駝路線:

<?xml version="1.0" encoding="ASCII"?> 
<routes xmlns="http://camel.apache.org/schema/spring"> 
    <route> 
     <from uri="switchyard://FileService" /> 
     <log message="inside route" /> 
     <doTry> 
      <split streaming="true"> 
       <tokenize token="/n"></tokenize> 

       <unmarshal ref="bindyDataformat" > 
        <bindy classType="com.agcs.bih.prototypes.filetosca.Student" type="Csv"/> 
       </unmarshal> 
       <process ref="ProcessCSV"></process> 
      </split> 

      <doCatch> 

       <exception>java.lang.Exception</exception> 
       <log message="FileToScaRoute - message received: ${exception.message}" /> 

      </doCatch> 
     </doTry> 
    </route> 
</routes> 

蔭部署過程中得到以下例外。

引起:java.lang.IllegalArgumentException:無法創建數據格式'bindy-csv'。確保數據格式是有效的和相關的駱駝成分存在於類路徑

附加的server.log

能否請你幫

回答

0

闖民宅鏈接https://developer.jboss.org/thread/177124.I後添加在Maven的Jar插件POM XML清單項

<manifestEntries>       
<Dependencies>org.apache.camel.bindy export services</Dependencies> 
</manifestEntries> 

亞姆能夠解組,現在使用的駱駝bindy到POJO。

0

請參閱;

http://camel.apache.org/bindy.html

確保你已經創建bindyDataFormat

<dataFormats> <bindy id="bindyDataformat" type="Csv" classType="org.apache.camel.bindy.model.Order"/> </dataFormats>

1

這聽起來像你可能使用JBoss FSW? EAP 6.3上的保險絲6.3包括駱駝綁定,並且如果您可以升級,那麼SwitchYard也包含一個例子。

+0

嗨湯姆,是我使用FSW 6.0.I已發佈答案。 – Ravi