Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
309 views
in Technique[技术] by (71.8m points)

java - Apache Camel context getting stopped automatically

I have a weird issue. Everything works perfectly when i run from IDE. Camel context gets stopped automatically when i run from console. What is causing the issue?

Logs attached.

10:04:22.015 [Thread-3] DEBUG o.a.c.i.c.AnnotationTypeConverterLoader - Found 3 packages with 16 @Converter classes to load 10:04:22.079 [Thread-3] DEBUG o.a.c.i.c.AnnotationTypeConverterLoader - Loading file META-INF/services/org/apache/camel/TypeConverter to retrieve list of packages, from url: jar:file:/C:/projects/project/BS/distribution/target/org-bin.tar/org-bin/Plugins/project.jar!/META-INF/services/org/apache/camel/TypeConverter 10:04:22.088 [Thread-3] DEBUG o.a.c.i.c.AnnotationTypeConverterLoader - No additional package names found in classpath for annotated type converters. 10:04:22.089 [Thread-3] INFO o.a.c.i.c.DefaultTypeConverter - Loaded 182 type converters 2017-04-19 10:04:22.097 [Thread-3] INFO project - Routes added 10:04:22.099 [Thread-3] INFO o.a.camel.impl.DefaultCamelContext - Apache Camel 2.17.1 (CamelContext: DataCollectorContext) is starting 10:04:22.101 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - Using ClassResolver=org.apache.camel.impl.DefaultClassResolver@6bac7e25, PackageScanClassResolver=org.apache.camel.impl.DefaultPackageScanClassResolver@1a0481c5, ApplicationContextClassLoader=null 10:04:22.101 [Thread-3] INFO o.a.camel.impl.DefaultCamelContext - StreamCaching is enabled on CamelContext: DataCollectorContext 10:04:22.103 [Thread-3] INFO o.a.c.m.DefaultManagementStrategy - JMX is disabled 10:04:22.115 [Thread-3] DEBUG o.a.c.impl.SharedProducerServicePool - Starting service pool: org.apache.camel.impl.SharedProducerServicePool@4cf1dba5 10:04:22.115 [Thread-3] DEBUG o.a.c.i.SharedPollingConsumerServicePool - Starting service pool: org.apache.camel.impl.SharedPollingConsumerServicePool@7257f81d 10:04:22.125 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - Using ComponentResolver: org.apache.camel.impl.DefaultComponentResolver@205acc67 to resolve component with name: seda 10:04:22.126 [Thread-3] DEBUG o.a.c.impl.DefaultComponentResolver - Found component: seda in registry: null 10:04:22.131 [Thread-3] DEBUG o.a.c.impl.DefaultComponentResolver - Found component: seda via type: org.apache.camel.component.seda.SedaComponent via: META-INF/services/org/apache/camel/component/seda 10:04:22.152 [Thread-3] DEBUG o.apache.camel.impl.DefaultComponent - Creating endpoint uri=[seda://aggregate], path=[aggregate] 10:04:22.162 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - seda://aggregate converted to endpoint: Endpoint[seda://aggregate] by component: org.apache.camel.component.seda.SedaComponent@2be155b8 10:04:22.163 [Thread-3] DEBUG o.a.c.component.seda.SedaComponent - Created queue seda://aggregate with size null 10:04:22.163 [Thread-3] INFO o.a.c.component.seda.SedaEndpoint - Endpoint Endpoint[seda://aggregate] is using shared queue: seda://aggregate with size: 2147483647 10:04:22.215 [Thread-3] DEBUG o.a.c.p.interceptor.DefaultChannel - Initialize channel for target: 'SetHeader[id, constant{n/a}]' 10:04:22.266 [Thread-3] DEBUG o.apache.camel.impl.DefaultComponent - Creating endpoint uri=[seda://process?waitForTaskToComplete=Never], path=[process] 10:04:22.270 [Thread-3] DEBUG o.a.c.i.c.DefaultTypeConverter - Promoting fallback type converter as a known type converter to convert from: org.apache.camel.WaitForTaskToComplete to: java.lang.String for the fallback converter: org.apache.camel.impl.converter.EnumTypeConverter@42fd1257 10:04:22.271 [Thread-3] DEBUG o.a.camel.util.IntrospectionSupport - Configured property: waitForTaskToComplete on bean: Endpoint[seda://process?waitForTaskToComplete=Never] with value: Never 10:04:22.272 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - seda://process?waitForTaskToComplete=Never converted to endpoint: Endpoint[seda://process?waitForTaskToComplete=Never] by component: org.apache.camel.component.seda.SedaComponent@2be155b8 10:04:22.272 [Thread-3] DEBUG o.a.c.component.seda.SedaComponent - Created queue seda://process with size null 10:04:22.272 [Thread-3] INFO o.a.c.component.seda.SedaEndpoint - Endpoint Endpoint[seda://process?waitForTaskToComplete=Never] is using shared queue: seda://process with size: 2147483647 10:04:22.275 [Thread-3] DEBUG o.a.c.p.interceptor.DefaultChannel - Initialize channel for target: 'To[seda:process?waitForTaskToComplete=Never]' 10:04:22.292 [Thread-3] DEBUG o.a.c.p.interceptor.DefaultChannel - Initialize channel for target: 'Aggregate[header(id) -> [To[seda:process?waitForTaskToComplete=Never]]]' 10:04:22.303 [Thread-3] DEBUG o.apache.camel.impl.DefaultComponent - Creating endpoint uri=[seda://process], path=[process] 10:04:22.303 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - seda://process converted to endpoint: Endpoint[seda://process] by component: org.apache.camel.component.seda.SedaComponent@2be155b8 10:04:22.304 [Thread-3] DEBUG o.a.c.component.seda.SedaComponent - Reusing existing queue seda://process with size null and reference count 2 10:04:22.304 [Thread-3] INFO o.a.c.component.seda.SedaEndpoint - Endpoint Endpoint[seda://process] is using shared queue: seda://process with size: 2147483647 10:04:22.308 [Thread-3] DEBUG o.a.c.p.interceptor.DefaultChannel - Initialize channel for target: 'process[Processor@0x71ed8637]' 10:04:22.310 [Thread-3] DEBUG o.apache.camel.impl.DefaultComponent - Creating endpoint uri=[seda://cloud?waitForTaskToComplete=Never], path=[cloud] 10:04:22.311 [Thread-3] DEBUG o.a.camel.util.IntrospectionSupport - Configured property: waitForTaskToComplete on bean: Endpoint[seda://cloud?waitForTaskToComplete=Never] with value: Never 10:04:22.312 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - seda://cloud?waitForTaskToComplete=Never converted to endpoint: Endpoint[seda://cloud?waitForTaskToComplete=Never] by component: org.apache.camel.component.seda.SedaComponent@2be155b8 10:04:22.312 [Thread-3] DEBUG o.a.c.component.seda.SedaComponent - Created queue seda://cloud with size null 10:04:22.312 [Thread-3] INFO o.a.c.component.seda.SedaEndpoint - Endpoint Endpoint[seda://cloud?waitForTaskToComplete=Never] is using shared queue: seda://cloud with size: 2147483647 10:04:22.313 [Thread-3] DEBUG o.a.c.p.interceptor.DefaultChannel - Initialize channel for target: 'To[seda:cloud?waitForTaskToComplete=Never]' 10:04:22.314 [Thread-3] DEBUG o.apache.camel.impl.DefaultComponent - Creating endpoint uri=[seda://cloud], path=[cloud] 10:04:22.315 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - seda://cloud converted to endpoint: Endpoint[seda://cloud] by component: org.apache.camel.component.seda.SedaComponent@2be155b8 10:04:22.315 [Thread-3] DEBUG o.a.c.component.seda.SedaComponent - Reusing existing queue seda://cloud with size null and reference count 2 10:04:22.315 [Thread-3] INFO o.a.c.component.seda.SedaEndpoint - Endpoint Endpoint[seda://cloud] is using shared queue: seda://cloud with size: 2147483647 10:04:22.318 [Thread-3] DEBUG o.a.c.p.interceptor.DefaultChannel - Initialize channel for target: 'process[Processor@0x8b29880]' 10:04:22.320 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - Using ComponentResolver: org.apache.camel.impl.DefaultComponentResolver@205acc67 to resolve component with name: rest 10:04:22.321 [Thread-3] DEBUG o.a.c.impl.DefaultComponentResolver - Found component: rest in registry: null 10:04:22.322 [Thread-3] DEBUG o.a.c.impl.DefaultComponentResolver - Found component: rest via type: org.apache.camel.component.rest.RestComponent via: META-INF/services/org/apache/camel/component/rest 10:04:22.326 [Thread-3] DEBUG o.apache.camel.impl.DefaultComponent - Creating endpoint uri=[rest://post:api/v1:/datacollector?componentName=restlet&consumes=application%2Foctet-stream&routeId=Data+Collector+Inlet], path=[post:api/v1:/datacollector] 10:04:22.327 [Thread-3] DEBUG o.a.camel.util.IntrospectionSupport - Configured property: componentName on bean: Endpoint[rest://post:api/v1:/datacollector?componentName=restlet&consumes=application%2Foctet-stream&routeId=Data+Collector+Inlet] with value: restlet 10:04:22.328 [Thread-3] DEBUG o.a.camel.util.IntrospectionSupport - Configured property: consumes on bean: Endpoint[rest://post:api/v1:/datacollector?componentName=restlet&consumes=application%2Foctet-stream&routeId=Data+Collector+Inlet] with value: application/octet-stream 10:04:22.328 [Thread-3] DEBUG o.a.camel.util.IntrospectionSupport - Configured property: routeId on bean: Endpoint[rest://post:api/v1:/datacollector?componentName=restlet&consumes=application%2Foctet-stream&routeId=Data+Collector+Inlet] with value: Data Collector Inlet 10:04:22.330 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - rest://post:api/v1:/datacollector?componentName=restlet&consumes=application%2Foctet-stream&routeId=Data+Collector+Inlet converted to endpoint: Endpoint[rest://post:api/v1:/datacollector?componentName=restlet&consumes=application%2Foctet-stream&routeId=Data+Collector+Inlet] by component: org.apache.camel.component.rest.RestComponent@647c8a45 10:04:22.337 [Thread-3] DEBUG o.a.c.p.interceptor.DefaultChannel - Initialize channel for target: 'RestBinding' 10:04:22.340 [Thread-3] DEBUG o.apache.camel.impl.DefaultComponent - Creating endpoint uri=[seda://aggregate?waitForTaskToComplete=Never], path=[aggregate] 10:04:22.340 [Thread-3] DEBUG o.a.camel.util.IntrospectionSupport - Configured property: waitForTaskToComplete on bean: Endpoint[seda://aggregate?waitForTaskToComplete=Never] with value: Never 10:04:22.341 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - seda://aggregate?waitForTaskToComplete=Never converted to endpoint: Endpoint[seda://aggregate?waitForTaskToComplete=Never] by component: org.apache.camel.component.seda.SedaComponent@2be155b8 10:04:22.341 [Thread-3] DEBUG o.a.c.component.seda.SedaComponent - Reusing existing queue seda://aggregate with size null and reference count 2 10:04:22.341 [Thread-3] INFO o.a.c.component.seda.SedaEndpoint - Endpoint Endpoint[seda://aggregate?waitForTaskToComplete=Never] is using shared queue: seda://aggregate with size: 2147483647 10:04:22.341 [Thread-3] DEBUG o.a.c.p.interceptor.DefaultChannel - Initialize channel for target: 'To[seda:aggregate?waitForTaskToComplete=Never]' 10:04:22.342 [Thread-3] INFO o.a.camel.impl.DefaultCamelContext - AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance. 10:04:22.346 [Thread-3] DEBUG o.a.c.i.DefaultStreamCachingStrategy - Created spool directory: C:Users310103~1AppDataLocalTempcamelcamel-tmp-4fc4d293-9e75-4dc4-967d-c97fbff9a725 10:04:22.347 [Thread-3] DEBUG o.a.c.i.DefaultStreamCachingStrategy - StreamCaching configuration DefaultStreamCachingStrategy[spoolDirectory=C:Users310103~1AppDataLocalTempcamelcamel-tmp-4fc4d293-9e75-4dc4-967d-c97fbff9a725, spoolChiper=null, spoolThreshold=131072, spoolUsedHeapMemoryThreshold=0, bufferSize=4096, anySpoolRules=false] 10:04:22.347 [Thread-3] INFO o.a.c.i.DefaultStreamCachingStrategy - StreamCaching in use with spool directory: C:Users310103~1AppDataLocalTempcamelcamel-tmp-4fc4d293-9e75-4dc4-967d-c97fbff9a725 and rules: [Spool > 128K body size] 10:04:22.348 [Thread-3] DEBUG o.a.camel.impl.DefaultCamelContext - Warming up route id: Message Aggregation having autoStartup=true 10:04:22.349 [Thread-3] DEBUG org.apache.camel.impl.RouteService - Starting services on route: Message Aggregation 10:04:22.351 [Thread-3] DEBUG org.apache.camel.impl.RouteService - Starting child service on route: Message Aggregation -> Pipeline[[Channel[SetHeader(id, n/a)], Channel[AggregateProcessor[to: Channel[sendTo(Endpoint[seda://process?waitForTaskToComplete=Never])]]]]] 10:04:22.353 [Thread-3] INFO o.a.c.p.aggregate.AggregateProcessor - Defaulting to MemoryAggregati


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There was a problem with TypeConvertor in packaging. All the files were not getting downloaded from maven. Used maven-assembly-plugin to make a jar with dependencies.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...