camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Commented: (CAMEL-2663) DefaultPackageScanClassResolver can't read entries in an eclipse rcp app because it can't handle bundleresource - protocol
Date Thu, 22 Apr 2010 09:03:25 GMT


Claus Ibsen commented on CAMEL-2663:

Its based on EPL license, which is in B category

However the source code where its being used will be minimal and with really very very low
change some end user will derive this work without knowing the license implications by Eclipse.

And the jar is

Which is in central maven repo, so it may be doable.

> DefaultPackageScanClassResolver can't read entries in an eclipse rcp app because it can't
handle bundleresource - protocol
> --------------------------------------------------------------------------------------------------------------------------
>                 Key: CAMEL-2663
>                 URL:
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.2.0
>         Environment: Windows, Eclipse 3.5.2
>            Reporter: Christoph Dittberner
>            Assignee: Willem Jiang
>         Attachments:
> scenario:
> I have an eclipse rcp based app and use the apache camel libs within my plugin, i.e.
the libs are one classpath of the plugin. I use a route using camel-mail to process some mailqueues.
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>     public void configure()	{
>         from("imaps://mailserver?username=user&password=password&consumer.delay=5000&delete=false&unseen=true")
>             .to("log: new mail");
>    }});
>    context.start();
> When I start my app all seems to be ok. But in my log I get a lot of error messages regarding
the loading of converters. If I ask my context to find a converter f.i. to converty to byte[]
form inputstream (as I did see in another mail example reagding attachments) I get null because
the context can't find one.
> I debugged  deeper into the camel code and it seems that the DefaultPackageScanClassResolver
can't load from urls starting with bundleresource like "bundleresource://109.fwk32380043:4/org/apache/camel/component/file/"
> using camel-osgi didn't worked because all camel libs are loaded as inner libs of my
single plugin and not as plugins. (loading as plugins didn't worked but thats another problem/bug)
> LOG Messages:
> 2010-04-21 11:15:34,829 DEBUG org.apache.camel.impl.converter.DefaultTypeConverter loadTypeConverters
- Loading type converters ...
> 2010-04-21 11:15:34,829 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver findAnnotated
- Searching for annotations of org.apache.camel.Converter in packages: [org.apache.camel.component.file,
org.apache.camel.component.bean, org.apache.camel.converter, org.apache.camel.component.mail,
> 2010-04-21 11:15:34,829 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver getClassLoaders
- The thread context class loader: org.eclipse.core.runtime.internal.adaptor.ContextFinder@1a76eff
 is used to load the class
> 2010-04-21 11:15:34,829 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver find
- Searching for: annotated with @Converter in package: org/apache/camel/component/file using
classloader: org.eclipse.core.runtime.internal.adaptor.ContextFinder
> 2010-04-21 11:15:39,954 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver getResources
- Getting resource URL for package: org/apache/camel/component/file with classloader: org.eclipse.core.runtime.internal.adaptor.ContextFinder@1a76eff
> 2010-04-21 11:16:44,970 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver find
- URL from classloader: bundleresource://109.fwk32380043:4/org/apache/camel/component/file/
> 2010-04-21 11:17:01,642 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver find
- Decoded urlPath: /org/apache/camel/component/file/ with protocol: bundleresource
> 2010-04-21 11:23:59,814 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver find
- isLocalFileSystem: false
> 2010-04-21 11:24:00,470 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver find
- Scanning for classes in [/org/apache/camel/component/file/] matching criteria: annotated
with @Converter
> 2010-04-21 11:24:16,079 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver find
- Loading from jar using http/https: /org/apache/camel/component/file/
> 2010-04-21 11:24:26,626 DEBUG org.apache.camel.impl.DefaultPackageScanClassResolver find
- Cannot read entries in url: bundleresource://109.fwk32380043:4/org/apache/camel/component/file/
> no protocol: /org/apache/camel/component/file/
> 	at<init>(
> 	at<init>(
> 	at<init>(
> 	at org.apache.camel.impl.DefaultPackageScanClassResolver.find(
> 	at org.apache.camel.impl.DefaultPackageScanClassResolver.find(
> 	at org.apache.camel.impl.DefaultPackageScanClassResolver.findAnnotated(
> 	at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(
> 	at org.apache.camel.impl.converter.DefaultTypeConverter.loadTypeConverters(
> 	at org.apache.camel.impl.converter.DefaultTypeConverter.doStart(
> 	at org.apache.camel.impl.ServiceSupport.start(
> 	at org.apache.camel.util.ServiceHelper.startService(
> 	at org.apache.camel.impl.DefaultCamelContext.startServices(
> 	at org.apache.camel.impl.DefaultCamelContext.addService(
> 	at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(
> 	at org.apache.camel.util.CamelContextHelper.convertTo(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message