camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Daubman <daub...@gmail.com>
Subject Difficulty with BeanIO from 2.10-SNAPSHOT - route does NOT start
Date Wed, 04 Apr 2012 20:51:39 GMT
Greetings,

I was excited to see BeanIO support added in 2.10 and so I am
attempting to build a simple route using 2.10-SNAPSHOT.

Unfortunately, as soon as I introduce the BeanIO DataFormat unmarshal
endoint to the route, the route fails to start.

Here is a route that works as expected:
---snip---
       from(fileUri.toString())
               .log("Consuming file ${file:name}")
               .convertBodyTo(String.class)
               //.unmarshal(dataCoreFormatTest)
               //.split(body())
               .to("stream:out");
---snip---

Here is a route that never starts:
---snip---
        from(fileUri.toString())
                .log("Consuming file ${file:name}")
                //.convertBodyTo(String.class)
                .unmarshal(dataCoreFormatTest)
                .split(body())
                .to("stream:out");
---snip---

With regular logging, when I run mvn camel:run I get the following
with the non-working BeanIO route:
---snip---
[pache.camel.spring.Main.main()] SpringCamelContext             INFO
Apache Camel 2.10-SNAPSHOT (CamelContext: camel-1) is starting
[pache.camel.spring.Main.main()] ManagementStrategyFactory      INFO
JMX enabled.
[pache.camel.spring.Main.main()] ultManagementLifecycleStrategy INFO
StatisticsLevel at All so enabling load performance statistics
[pache.camel.spring.Main.main()] DefaultTypeConverter           INFO
Loaded 169 type converters
---snip---

After this it just hangs forever.

With DEBUG level logging, these are the last statements logged before hanging:
---snip---
[pache.camel.spring.Main.main()] DefaultChannel                 DEBUG
Initialize channel for target: 'Log[Consuming file ${file:name}]'
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with objectname:
org.apache.camel:context=myhostname/camel-1,type=tracer,name=Tracer(0x73aa9e73)
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with objectname:
org.apache.camel:context=myhostname/camel-1,type=errorhandlers,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)"
[pache.camel.spring.Main.main()] DefaultChannel                 DEBUG
Initialize channel for target:
'Unmarshal[org.apache.camel.model.DataFormatDefinition@211f780f]'
[pache.camel.spring.Main.main()] DefaultComponentResolver       DEBUG
Found component: stream in registry: null
[pache.camel.spring.Main.main()] DefaultComponentResolver       DEBUG
Found component: stream via type:
org.apache.camel.component.stream.StreamComponent via:
META-INF/services/org/apache/camel/component/stream
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with objectname:
org.apache.camel:context=myhostname/camel-1,type=components,name="stream"
[pache.camel.spring.Main.main()] DefaultComponent               DEBUG
Creating endpoint uri=[stream://out], path=[out], parameters=[{}]
[pache.camel.spring.Main.main()] SpringCamelContext             DEBUG
stream://out converted to endpoint: Endpoint[stream://out] by
component: org.apache.camel.component.stream.StreamComponent@3e5928b8
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with objectname:
org.apache.camel:context=myhostname/camel-1,type=endpoints,name="stream://out"
[pache.camel.spring.Main.main()] StreamEndpoint                 DEBUG
No encoding parameter using default charset: UTF-8
[pache.camel.spring.Main.main()] DefaultChannel                 DEBUG
Initialize channel for target: 'To[stream:out]'
[pache.camel.spring.Main.main()] DefaultChannel                 DEBUG
Initialize channel for target: 'Split[{body} -> [To[stream:out]]]'
[pache.camel.spring.Main.main()] SpringCamelContext             DEBUG
Warming up route id: route1 having autoStartup=true
[pache.camel.spring.Main.main()] RouteService                   DEBUG
Starting services on route: route1
[pache.camel.spring.Main.main()] DefaultTypeConverter           DEBUG
Promoting fallback type converter as a known type converter to convert
from: org.apache.camel.LoggingLevel to: java.lang.String for the
fallback converter:
org.apache.camel.impl.converter.EnumTypeConverter@106d3f9d
[pache.camel.spring.Main.main()] RouteService                   DEBUG
Starting child service on route: route1 ->
Instrumentation:route[DelegateAsync[UnitOfWork(Pipeline[[Channel[Log(route1)[Consuming
file ${file:name}]],
Channel[Unmarshal[org.apache.camel.dataformat.beanio.BeanIODataFormat@296db5ee]],
Channel[Splitter[on: body to: Channel[sendTo(Endpoint[stream://out])]
aggregate: null]]]])]]
[pache.camel.spring.Main.main()] DefaultManagementAgent         DEBUG
Registered MBean with objectname:
org.apache.camel:context=myhostname/camel-1,type=threadpools,name="DefaultErrorHandler(0x731475db)"
[pache.camel.spring.Main.main()] DefaultExecutorServiceManager  DEBUG
Created new ScheduledThreadPool for source:
DefaultErrorHandler[TraceInterceptor[Log[Consuming file
${file:name}]]] with name: ErrorHandlerRedeliveryTask. ->
org.apache.camel.util.concurrent.RejectableScheduledThreadPoolExecutor@4445b7e3[Running,
pool size = 0, active threads = 0, queued tasks = 0, completed tasks =
0]
[pache.camel.spring.Main.main()] DefaultErrorHandler            DEBUG
Redelivery enabled: false on error handler:
DefaultErrorHandler[TraceInterceptor[Log[Consuming file
${file:name}]]]
---snip---

Note that I tried setting
log4j.logger.org.apache.camel.dataformat.beanio=TRACE but never
receive any log statements regarding BeanIO.

Any hints/suggestions? What should I do to determine the source of the hang?

Thanks,
   Aaron

Mime
View raw message