Search code examples
csvapache-cameljbossfusejboss-eap-6switchyard

Camel Bindy application JBoss EAP 6.1 Deployment issue


I am trying to deploy a camel application which reads CSV file and process it.I am trying to use camel bindy to unmarshal the csv to POJO. The camel bindy module was not available in jboss EAP i have added it.

Camel Route:

<?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>

Iam getting the below exception during deployment.

Caused by: java.lang.IllegalArgumentException: Data format 'bindy-csv' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath

Attaching server.log

Can you please help


Solution

  • After refering the link https://developer.jboss.org/thread/177124.I have added the manifest entry in maven jar plugin pom xml

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

    iam able to unmarshal it to pojo using camel bindy now.