It seems that Apache Felxi Karaf 1.1.SNAPSHOT + Equinox
(osgi-3.5.1.v20090827.jar) does not load a TypeConverter defined in
META-INF/services/org/apache/camel directory

        from("file:src/data?noop=true")
            .convertBodyTo(PersonDocument.class)
            .to("jpa:org.apache.camel.example.etl.CustomerEntity");

        // the following will dump the database to files

from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false&delay=3000&consumeLockEntity=false")
            .setHeader(Exchange.FILE_NAME, el("${in.body.userName}.xml"))
            .to("file:target/customers");


11:39:49,934 | INFO  | 1: FileComponent | Tracer                           |
rg.apache.camel.processor.Logger   88 | 5e0daace-f84c-4b28-bfee-33347488e91a
>>> (route1)  --> jpa://org.apache.camel.example.etl.CustomerEntity <<<
Pattern:InOnly, Headers:{CamelFileNameOnly=row2.xml,
CamelFileAbsolutePath=D:\Temp\tutorial\camel-example-etl\apache-felix-karaf-1.1.0-SNAPSHOT\src\data\row2.xml,
CamelFileLastModified=Tue Jul 14 10:37:40 CEST 2009,
CamelFileAbsolute=false, CamelFileParent=src\data,
CamelFileRelativePath=row2.xml, CamelFileName=row2.xml,
CamelFilePath=src\data\row2.xml, CamelFileLength=982},
BodyType:org.apache.camel.example.etl.PersonDocument, Body:<person
user="hiram"><firstName>Hiram</firstName><lastName>Chirino</lastName><city>Tampa</city></person>
11:39:49,950 | ERROR | 1: FileComponent | GenericFileOnCompletion          |
rg.apache.camel.processor.Logger  248 | No body available of type:
org.apache.camel.example.etl.CustomerEntity but has value: Person[user:
hiram] of type: org.apache.camel.example.etl.PersonDocument on:
GenericFileMessage with body: Person[user: hiram] on the exchange:
Exchange[GenericFileMessage with body: Person[user: hiram]]
org.apache.camel.InvalidPayloadRuntimeException: No body available of type:
org.apache.camel.example.etl.CustomerEntity but has value: Person[user:
hiram] of type: org.apache.camel.example.etl.PersonDocument on:
GenericFileMessage with body: Person[user: hiram] on the exchange:
Exchange[GenericFileMessage with body: Person[user: hiram]]
    at
org.apache.camel.component.jpa.JpaEndpoint$1.evaluate(JpaEndpoint.java:268)

Any idea is welcome ?

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm

Reply via email to