0 Replies Latest reply on Mar 13, 2014 12:53 PM by Muhammad Sohail

    JBoss Fuse - C24 IO package issue

    Muhammad Sohail Newbie

      I am trying to execute a route that converts ISO 20022 messages using C24 IO APIs.

       

      I added http://repo.c24io.net:8081/nexus/content/groups/public/ in pom.xml along with appropriate dependencies. Now I am trying to execute the following:

       

       

      import iso.std.iso.x20022.tech.xsd.pacs.x003.x001.x01.DocumentElement;

       

      import org.apache.camel.builder.RouteBuilder;

      import org.apache.camel.model.dataformat.C24IOContentType;

       


      public class C24Route extends RouteBuilder {

        @Override

        public void configure() throws Exception {

          from("file:src/data/sohail?noop=true")

            .unmarshal().c24io(DocumentElement.class, C24IOContentType.Xml)

            .log("${body}");


      I am receiving the following when I execute this route and request help from anyone out there. I have tried but cannot make sense of where 'org.fusesource.fabric.camel.c24ui.C24IOFormat' class is supposed to be :


       

      [INFO] <<< camel-maven-plugin:2.12.2:run (default-cli) @ c24poc <<<

      [INFO]

      [INFO] --- camel-maven-plugin:2.12.2:run (default-cli) @ c24poc ---

      [INFO] Using org.apache.camel.spring.Main to initiate a CamelContext

      [pache.camel.spring.Main.main()] MainSupport                    INFO  Apache Camel 2.12.0.redhat-610312 starting

      [pache.camel.spring.Main.main()] ClassPathXmlApplicationContext INFO Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@7993704: startup date [Thu Mar 13 20:18:33 GST 2014]; root of context hierarchy

      [pache.camel.spring.Main.main()] XmlBeanDefinitionReader        INFO  Loading XML bean definitions from file [C:\Users\muhammad_sohail\workspace\c24poc\target\classes\META-INF\spring\c24pocCamelContext.xml]

      [pache.camel.spring.Main.main()] DefaultListableBeanFactory     INFO  Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@28233ffd: defining beans [template,consumerTemplate,c24pocCamelContext:beanPostProcessor,c24pocCamelContext]; root of factory hierarchy

      [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.12.0.redhat-610312 (CamelContext: c24pocCamelContext) is starting

      [pache.camel.spring.Main.main()] ManagedManagementStrategy      INFO  JMX is enabled

      [pache.camel.spring.Main.main()] DefaultTypeConverter           INFO  Loaded 178 type converters

      [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.12.0.redhat-610312 (CamelContext: c24pocCamelContext) is shutting down

      [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.12.0.redhat-610312 (CamelContext: c24pocCamelContext) uptime 0.231 seconds

      [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.12.0.redhat-610312 (CamelContext: c24pocCamelContext) is shutdown in 0.002 seconds

      [pache.camel.spring.Main.main()] MainSupport                    INFO  Apache Camel 2.12.0.redhat-610312 stopping

      [ERROR] *************************************

      [ERROR] Error occurred while running main from: org.apache.camel.spring.Main

      [ERROR]

      java.lang.reflect.InvocationTargetException

             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

             at java.lang.reflect.Method.invoke(Method.java:606)

             at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:486)

             at java.lang.Thread.run(Thread.java:744)

      Caused by: org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> Unmarshal[org.apache.camel.model.dataformat.C24IODataFormat@242c5842] <<< in route: Route(route1)[[From[file:src/data/sohail?noop=true]] -> [Unm... because of Data format 'org.fusesource.fabric.camel.c24ui.C24IOFormat' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath

             at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1363)

             at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)

             at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:301)

             at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)

             at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)

             at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)

             at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

             at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)

             at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)

             at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:186)

             at org.apache.camel.spring.Main.doStart(Main.java:140)

             at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

             at org.apache.camel.main.MainSupport.run(MainSupport.java:148)

             at org.apache.camel.main.MainSupport.run(MainSupport.java:352)

             at org.apache.camel.spring.Main.main(Main.java:73)

             ... 6 more

      Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> Unmarshal[org.apache.camel.model.dataformat.C24IODataFormat@242c5842] <<< in route: Route(route1)[[From[file:src/data/sohail?noop=true]] -> [Unm... because of Data format 'org.fusesource.fabric.camel.c24ui.C24IOFormat' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath

             at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:912)

             at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:177

             at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:777)

             at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1929)

             at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1685)

             at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1559)

             at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)

             at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

             at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1527)

             at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)

             at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)

             ... 19 more

      Caused by: java.lang.IllegalArgumentException: Data format 'org.fusesource.fabric.camel.c24ui.C24IOFormat' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath

             at org.apache.camel.model.DataFormatDefinition.getDataFormat(DataFormatDefinition.java:90)

             at org.apache.camel.model.DataFormatDefinition.getDataFormat(DataFormatDefinition.java:80)

             at org.apache.camel.model.UnmarshalDefinition.createProcessor(UnmarshalDefinition.java:162)

             at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:500)

             at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:213)

             at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:909)

             ... 29 more

      [ERROR] *************************************

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 2:36.252s

      [INFO] Finished at: Thu Mar 13 20:18:35 GST 2014

      [INFO] Final Memory: 32M/156M

      [INFO] ------------------------------------------------------------------------

      [ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.12.2:run (default-cli) on project c24poc: null: MojoExecutionException: InvocationTargetException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> Unmarshal[org.apache.camel.model.dataformat.C24IODataFormat@242c5842] <<< in route: Route(route1)[[From[file:src/data/sohail?noop=true]] -> [Unm... because of Data format 'org.fusesource.fabric.camel.c24ui.C24IOFormat' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath -> [Help 1]

      [ERROR]

      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

      [ERROR] Re-run Maven using the -X switch to enable full debug logging.

      [ERROR]

      [ERROR] For more information about the errors and possible solutions, please read the following articles:

      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException