Hey everyone, I am in the process of learning how to route with Camel and am
having an issue with unmarshalling a Jaxb message.  The scenerio is such
that I have a processor bean that is intended to process the data after the
XML has been unmarshalled.  I put a jaxb.index file in the
com.mycompany.camel.loyalty directory and listed all the Jaxb classes in
that file.  My Camel-Context is as follows:


<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="SiteBean" class="com.mycompany.camel.beans.SiteBean"></bean>


<camel:camelContext xmlns="http://camel.apache.org/schema/spring";>
     <dataFormats>
        <jaxb id="jaxb" contextPath="com.mycompany.camel.loyalty"/>
    </dataFormats>
    
    <route>
        <from uri="file:/Camel/CamelTest3/files/from?noop=true"/>
             <unmarshal ref="jaxb"/>
            <process ref="SiteBean" />
        <to uri="file:/Camel/CamelTest3/files/to"/>
    </route>
  </camel:camelContext>

</beans>

When I issue the command "mvn camel:run" I receive the following error
message:

[ERROR] Failed to execute goal
org.apache.camel:camel-maven-plugin:2.11.1:run (default-cli) on project
CamelTest3: null: MojoExecutionException: InvocationTargetException:
org.apache.camel.util.ObjectHelper.notNull(Ljava/lang/Object;Ljava/lang/String;)V
-> [Help 1]

Not sure exactly what this means.  If I remove the <unmarshal> tag it will
run, but I get this error everytime.  Any assistance would be greatly
appreciated!

Thanks

-Tim



--
View this message in context: 
http://camel.465427.n5.nabble.com/MojoExecutionException-Unmarshalling-from-XML-tp5736861.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to