camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From autose <jysu...@gmail.com>
Subject Re: Camel Bindy CVS to Bean Unmarshal process throws "No method invocation could be created" Exception.
Date Thu, 01 Jul 2010 07:35:43 GMT

Thanks for the tracer tip, I will enable it to take a look.

I made a typo and typed in the wrong java bean and spring config file.

Below is the java code and spring config and the error message.

1) Here is my Bean definition. 

package camelinaction.bindy; 

import org.apache.camel.dataformat.bindy.annotation.CsvRecord; 
import org.apache.camel.dataformat.bindy.annotation.DataField; 

        @CsvRecord(separator = ",") 
        public class UpdateInventory { 
        
        @DataField(pos = 1) 
        private String supplierId; 
        
        @DataField(pos = 2) 
        private String partId; 
                
        @DataField(pos = 3) 
        private String name; 
                
        @DataField(pos = 4) 
        private String amount; 
        
        public String getSupplierId() { 
                return supplierId; 
        } 
        
        public void setSupplierId(String supplierId) { 
                this.supplierId = supplierId; 
        } 
        
        public String getPartId() { 
                return partId; 
        } 
        
        public void setPartId(String partId) { 
                this.partId = partId; 
        } 
        
        public String getName() { 
                return name; 
        } 
        
        public void setName(String name) { 
                this.name = name; 
        } 
        
        public String getAmount() { 
                return amount; 
        } 
        
        public void setAmount(String amount) { 
                this.amount = amount; 
        } 

} 

2) Below is my Spring Config XML.

<?xml version="1.0" encoding="UTF-8"?> 

<beans xmlns="http://www.springframework.org/schema/beans" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xmlns:camel="http://camel.apache.org/schema/spring" 
       xsi:schemaLocation=" 
         http://www.springframework.org/schema/beans  
         http://www.springframework.org/schema/beans/spring-beans.xsd
         http://camel.apache.org/schema/spring  
         http://camel.apache.org/schema/spring/camel-spring.xsd"> 

    <bean id="bindyDataformat"
class="org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat">       
        <constructor-arg value="camelinaction.bindy" /> 
    </bean> 

    <bean id="myPool" class="java.util.concurrent.Executors"
factory-method="newFixedThreadPool"> 
        <constructor-arg index="0" value="2"/> 
    </bean> 
      
    <bean id="rawPOJO" class="camelinaction.bindy.UpdateInventory" /> 
    
    <!-- the camel context --> 
    <camelContext xmlns="http://camel.apache.org/schema/spring"> 
        <route> 
            <from uri="file:target/inventory?noop=true"/> 
            <split streaming="true" executorServiceRef="myPool"> 
                <tokenize token="\n"/> 
                <unmarshal ref="bindyDataformat" /> 
                <to uri="bean:rawPOJO" /> 
            </split> 
        </route> 

        <route> 
            <from uri="direct:rawPOJO"/> 
            <bean beanType="camelinaction.InventoryService"
method="updateDB"/> 
        </route> 

    </camelContext> 
        
</beans> 


and here is the exception when running.


 010-06-29 13:43:32,479 [ Thread 0 - file://target/inventory?noop=true] INFO
route1 - Starting to process big file: bigfile.csv 
2010-06-29 13:43:33,088 [ pool-1-thread-1] ERROR DefaultErrorHandler -
Failed delivery for exchangeId: 193ff30b-d0e6-4a8a-bbcc-6eb9db5b63cd.
Exhausted after delivery attempt: 1 caught:java.lang.IllegalStateException:
No method invocation could be created, no matching method could be found on:
camelinaction.UpdateInventory@14b9a74 
java.lang.IllegalStateException: No method invocation could be created, no
matching method could be found on: camelinaction.UpdateInventory@14b9a74 
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:130) 
at
org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:95) 
at
org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:65) 
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:106) 
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:104) 
at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:189) 
at
org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:103) 
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:87) 
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)

at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53) 
at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82) 
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:97)

at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)

at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:185)

at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:151)

at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:89)

at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49) 
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228) 
at org.apache.camel.processor.Pipeline.process(Pipeline.java:75) 
at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:185)

at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:151)

at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:89)

at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49) 
at
org.apache.camel.processor.MulticastProcessor.doProcess(MulticastProcessor.java:278) 
at
org.apache.camel.processor.MulticastProcessor.access$000(MulticastProcessor.java:62) 
at
org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:199) 
at
org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:193) 
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 
at java.util.concurrent.FutureTask.run(Unknown Source) 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
at java.lang.Thread.run(Unknown Source) 

-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-Bindy-CVS-to-Bean-Unmarshal-process-throws-No-method-invocation-could-be-created-Exception-tp511854p512301.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message