2 Replies Latest reply on Sep 8, 2010 2:50 PM by Peter Chandler

    SpringCamelContext and OSGi and DefaultPackageScanClassResolver

    Peter Chandler Master

      From OSGi activator I:

      1. Create a camel context.

      2. Start it.

       

      ...

       

      I get a six (6) stacktraces at the debug level. My questions: What does "Cannot read entries in url: bundleresource://71.fwk1258351596/org/apache/camel/component/bean/" mean?  Does this mean it can't access the configFileName?

       

       

      java code

                context = new SpringCamelContext(
                          SpringContextLoader.applicationContext(configFileName,
                                    Launcher.class));
                   context.start(); //stacktrace generated here
      

       

      Stacktrace @ debug log entry (6 times)

      15:09:49,868 | DEBUG | ase Service Unit | DefaultPackageScanClassResolver  | .DefaultPackageScanClassResolver  276 | Cannot read entries in url: bundleresource://71.fwk1258351596/org/apache/camel/converter/
      java.io.FileNotFoundException: /org/apache/camel/converter (No such file or directory)
           at java.io.FileInputStream.open(Native Method)
           at java.io.FileInputStream.<init>(FileInputStream.java:106)
           at org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:269)
           at org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:180)
           at org.apache.camel.impl.DefaultPackageScanClassResolver.findAnnotated(DefaultPackageScanClassResolver.java:100)
           at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:63)
           at org.apache.camel.impl.converter.DefaultTypeConverter.loadTypeConverters(DefaultTypeConverter.java:361)
           at org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:384)
           at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
           at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
           at org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1174)
           at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:644)
           at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:691)
           at org.apache.camel.impl.DefaultCamelContext.forceLazyInitialization(DefaultCamelContext.java:1211)
           at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1083)
           at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1020)
           at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:158)
           at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
           at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:898)
      ...
      15:09:49,868 | DEBUG | ase Service Unit | DefaultPackageScanClassResolver  | .DefaultPackageScanClassResolver  104 | Found: []
      15:09:49,868 | DEBUG | ase Service Unit | DefaultTypeConverter             | l.converter.DefaultTypeConverter  371 | Loading type converters done
      15:09:49,871 | DEBUG | ase Service Unit | DefaultManagementAgent           | anagement.DefaultManagementAgent  304 | Registered MBean with objectname: org.apache.camel:context=paris/camel-2,type=services,name=DefaultInflightRepository(0x4e993077)
      15:09:49,873 | DEBUG | ase Service Unit | DefaultManagementAgent           | anagement.DefaultManagementAgent  304 | Registered MBean with objectname: org.apache.camel:context=paris/camel-2,type=services,name=DefaultShutdownStrategy(0x2b3cfcf1)
      15:09:49,873 | DEBUG | ase Service Unit | DefaultComponent                 | ache.camel.impl.DefaultComponent   78 | Creating endpoint uri=[spring-event://default], path=[default], parameters=[{}]
      15:09:49,873 | DEBUG | ase Service Unit | DefaultCamelContext              | e.camel.impl.DefaultCamelContext  428 | spring-event://default converted to endpoint: Endpoint[spring-event://default] by component: org.apache.camel.component.event.EventComponent@31024864
      15:09:49,875 | DEBUG | ase Service Unit | DefaultManagementAgent           | anagement.DefaultManagementAgent  304 | Registered MBean with objectname: org.apache.camel:context=paris/camel-2,type=endpoints,name="spring-event://default"
      15:09:49,875 | DEBUG | ase Service Unit | DefaultCamelContext              | e.camel.impl.DefaultCamelContext  900 | Starting routes...
      15:09:49,875 | DEBUG | ase Service Unit | DefaultCamelContext              | e.camel.impl.DefaultCamelContext 1004 | ... Routes started
      15:09:49,875 | INFO  | ase Service Unit | DefaultCamelContext              | e.camel.impl.DefaultCamelContext 1007 | Started 0 routes
      15:09:49,875 | INFO  | ase Service Unit | DefaultCamelContext              | e.camel.impl.DefaultCamelContext 1009 | Apache Camel 2.2.0-fuse-02-00 (CamelContext:camel-2) started