[ 
https://issues.apache.org/activemq/browse/CAMEL-775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44678#action_44678
 ] 

Hendy Irawan commented on CAMEL-775:
------------------------------------

Without DynamicImport-Package this is what results...


[SpringOsgiExtenderThread-2] TRACE org.apache.camel.util.ResolverUtil - Testing 
for class org.apache.camel.converter.ObjectConverter matches criteria 
[annotated with @Converter]
[SpringOsgiExtenderThread-2] TRACE org.springframework.osgi.util.DebugUtils - 
Could not find class [org.apache.camel.converter.ObjectConverter] required by 
[org.elfattah.shell(org.elfattah.shell)] scanning available bundles
[SpringOsgiExtenderThread-2] DEBUG org.apache.camel.util.ResolverUtil - Could 
not find class 'org/apache/camel/converter/ObjectConverter.class' in 
classloader: BundleDelegatingClassLoader for [org.elfattah.shell 
(org.elfattah.shell)]. Reason: java.lang.ClassNotFoundException: 
org.apache.camel.converter.ObjectConverter not found from bundle 
[org.elfattah.shell]
java.lang.ClassNotFoundException: org.apache.camel.converter.ObjectConverter 
not found from bundle [org.elfattah.shell]
        at 
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
        at 
org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at 
org.apache.camel.util.ResolverUtil.addIfMatching(ResolverUtil.java:531)
        at 
org.apache.camel.util.ResolverUtil.loadImplementationsInBundle(ResolverUtil.java:409)
        at org.apache.camel.util.ResolverUtil.find(ResolverUtil.java:302)
        at org.apache.camel.util.ResolverUtil.find(ResolverUtil.java:279)
        at 
org.apache.camel.util.ResolverUtil.findAnnotated(ResolverUtil.java:255)
        at 
org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:66)
        at 
org.apache.camel.impl.converter.DefaultTypeConverter.checkLoaded(DefaultTypeConverter.java:218)
        at 
org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:64)
        at 
org.apache.camel.util.IntrospectionSupport.convert(IntrospectionSupport.java:216)
        at 
org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:194)
        at 
org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:167)
        at 
org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:195)
        at 
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:89)
        at 
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:272)
        at 
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:52)
        at org.apache.camel.model.RouteType.resolveEndpoint(RouteType.java:99)
        at 
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:102)
        at 
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108)
        at org.apache.camel.model.FromType.resolveEndpoint(FromType.java:73)
        at 
org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:77)
        at org.apache.camel.model.RouteType.addRoutes(RouteType.java:213)
        at org.apache.camel.model.RouteType.addRoutes(RouteType.java:89)
        at 
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:539)
        at 
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:531)
        at 
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:149)
        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
        at 
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
        at 
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
        at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
        at 
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
        at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.finishRefresh(AbstractDelegatedExecutionApplicationContext.java:306)
        at 
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:279)
        at 
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:145)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: 
org.apache.camel.converter.ObjectConverter
        at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481)
        at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
        at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
        at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at 
org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313)
        at 
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
        at 
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274)
        at 
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
        ... 38 more
[SpringOsgiExtenderThread-2] TRACE org.apache.camel.util.ResolverUtil - Testing 
for class org.apache.camel.converter.ObjectConverter matches criteria 
[annotated with @Converter]


> camel osgi DynamicImport-Package
> --------------------------------
>
>                 Key: CAMEL-775
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-775
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-osgi
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>             Fix For: 1.5.0
>
>
> See parent issue.
> Thanks Claus. I hope this can help getting it resolved. Let me know if it is, 
> even a snapshot will do very well for us.
> Another question, is below "DynamicImport-Package workaround" supposed to be 
> bug? Or it's just the way Camel needs to be configured on OSGi? If so it 
> should be mentioned somewhere in the docs... not everybody knows that 
> DynamicImport-Package even exists.. (even some OSGi programmers)
> First of all, to even get this to "work" requires my own bundle to have this 
> manifest:
> DynamicImport-Package: org.apache.camel.*
> Failing to do so will result in more classloading errors.

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

Reply via email to