camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john robens <jrob...@interlated.com.au>
Subject XML file input - NoTypeConversionAvailableException
Date Mon, 22 Feb 2010 12:46:16 GMT
Hi

I have this error - which seems relatively common except that my twist seems
to happen when am running camel from a jar file not from the mvn:camel
target.

> Works fine when run under "mvn camel:run"
> Fails when run java -jar
target/server-1.0-SNAPSHOT-jar-with-dependencies.jar

Is this a known thing, or do I need debugging hints to delve into a
classpath? Look at the camel converters?


Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type
converter available to convert from type:
org.apache.camel.component.file.GenericFile to the required type:
au.com.hearing.server.domain.Client with value GenericFile[pclient99981]]

a) XML file is defined in directory
b) Bean defined with @XmlRootElement(name = "notice")
c) POM file has camel-jaxb (camel 2.2.0)
d) route is as per ETL
example: from("file:../../../data/notice?noop=true").convertBodyTo(Notice.class).to("jpa:au.com.interlated.server.domain.Notice");
e) camel-maven-plugin has no particular arguments
f) maven-assembly-plugin used to build a jar file:


            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <!--

 <mainClass>org.apache.camel.spring.Main</mainClass>
                            -->

 <mainClass>au.com.interlated.server.AhsMessageRouter</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>


g) I can see jaxb in the resulting jar file:    0  02-10-10 23:25
org/apache/camel/converter/jaxb/



Thanks
John



-- 
http://interlated.com.au
0434 996 607

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message