Hi , 

i have spring dsl based camel context xml file. file is around 5 MB due to
some of the camel custom  components has endpoint properties which has
encoded XML content. bundles gets activated in OSGI container but not camel
context. but same will work when size of xml is less!!!. 

while trying to start CamelContext i could see below Error:

lidfrom%3E2016%2F07%2F12%2000%3A00%3A00%3C%2Fvalidfrom%3E%0A%3Cvalidto%3E9999%2F12%2F31%2023%3A59%3A59%3C%2Fvalidto%3E%0A%3Csend%3E1%3C%2Fsend%3E%0A%3Cpriority%3E3%3C%2Fpriority%3E%0A%3Cthreshold%3E500%3C%2Fthreshold%3E%0A%3Creadinterval%2F%3E%0A%3C%2Fruleobject%3E%0A%3Cruleobject%3E%0A%3Cequipmentid%3E5159588%3C%2Fequipmentid%3E%0A%3Cfeatureid%3E193%3C%2Ffeatureid%3E%0A%3Cvalidfrom%3E2015%2F10%2F16%2000%3A00%3A00%3C%2Fvalidfrom%3E%0A%3Cvalidto%3E2016%2F07%2F11%2023%3A59%3A59%3C%2Fvalidto%3E%0A%3Csend%3E0%3C%2Fsend%3E%0A%3Cpriority%3E3%3C%2Fpriority%3E%0A%3Cthreshold%2F%3E%0A%3Creadinterval%2F%3E%0A%3C%2Fruleobject%3E%0A%3C%2Frulelist%3E%0A%3C%2Fproperties%3E%0A]
<<< in route: Route(XXXDF15)[[From[httpserver:com.xxx.iotservices.HttpS...
because of java.lang.IllegalStateException: Invalid BundleContext.              
          
Sep 12, 2016 2:53:43 PM  [Info]
[com.xxx.iot.edge.core.deployer.SendCacheUpdates]
com.xxx.iotservices.connector.component.jetty is ACTIVE                         
                                                        
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1028)
 at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:185)
at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:841)
                                                                                
                                             
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2895)
                                                                                
                                
at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2618)
                                                                                
                                          
at
org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)
                                                                                
                                             
at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467) 
                                                                                
                                               
at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463) 
                                                                                
                                               
at
org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486)
                                                                                
                              
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463)
                                                                                
                                               
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)        
                                                                                
                                                  
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432)  
                                                                                
                                               
at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:255)
                                                                                
                                             
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:121)
                                                                                
                                    
... 10 more                                                                     
                                                                                
                                          
Caused by: org.apache.camel.RuntimeCamelException:
java.lang.IllegalStateException: Invalid BundleContext.                         
                                                                                
       
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1619)
                                                                                
                                           
at
org.apache.camel.core.osgi.OsgiServiceRegistry.findByTypeWithName(OsgiServiceRegistry.java:115)
                                                                                
                                
at
org.apache.camel.impl.CompositeRegistry.findByTypeWithName(CompositeRegistry.java:91)
                                                                                
                                          
at
org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.findByTypeWithName(PropertyPlaceholderDelegateRegistry.java:70)
                                                                                
      
at
org.apache.camel.processor.interceptor.DefaultChannel.getOrCreateBacklogTracer(DefaultChannel.java:333)
                                                                                
                        
at
org.apache.camel.processor.interceptor.DefaultChannel.initChannel(DefaultChannel.java:201)
                                                                                
                                     
at
org.apache.camel.model.ProcessorDefinition.wrapChannel(ProcessorDefinition.java:273)
                                                                                
                                           
at
org.apache.camel.model.ProcessorDefinition.wrapProcessor(ProcessorDefinition.java:255)
                                                                                
                                         
at
org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:512)
                                                                                
                                         
at
org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:217)
                                                                                
                                             
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1025)     
                                                                                
                                              
... 23 more                                                                     
                                                                                
                                          
Caused by: java.lang.IllegalStateException: Invalid BundleContext.              
                                                                                
                                                          
at
org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:511)
                                                                                
                                         
at
org.apache.felix.framework.BundleContextImpl.getAllServiceReferences(BundleContextImpl.java:413)
                                                                                
                               
at
org.apache.camel.core.osgi.OsgiServiceRegistry.findByTypeWithName(OsgiServiceRegistry.java:95)
                                                                                
                                
... 32 more                                                                     
                                                                                
                                          
Sep 12, 2016 2:55:10 PM  [Info]
[com.xxx.iot.edge.core.deployer.SendCacheUpdates]
com.xxx.iotservices.connector.component.sam2 is ACTIVE                          
                                                
Sep 12, 2016 2:55:10 PM  [Info]
[com.xxx.iot.edge.core.deployer.SendCacheUpdates]
com.xxx.iotservices.connector.core.dbcontroller.sSep 12, 2016 2:55:10 PM 
[Error] [com.xxx.iot.edge.core.deployer.CacheUpdate] Service References is
nul


how to fix this problem? 
Regards, 
Mayur



--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-with-Big-CamelContext-XML-configuration-files-tp5787501.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to