You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2008/06/16 17:57:00 UTC

[jira] Reopened: (CAMEL-577) ResolverUtil can't resolve class under osgi enviroment

     [ https://issues.apache.org/activemq/browse/CAMEL-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet reopened CAMEL-577:
-----------------------------------

      Assignee:     (was: Claus Ibsen)

With the current version, there is a strong dependency from camel-core to OSGi: i.e. camel can not run without the OSGi classes in the classpath.
See the following exception: 

Caused by: java.lang.NoClassDefFoundError: org/osgi/framework/Bundle
        at org.apache.camel.spring.RouteBuilderFinder.<init>(RouteBuilderFinder.java:41)
        at org.apache.camel.spring.CamelContextFactoryBean.findRouteBuiders(CamelContextFactoryBean.java:404)
        at org.apache.camel.spring.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:189)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
        ... 41 more

> ResolverUtil can't resolve class under osgi enviroment
> ------------------------------------------------------
>
>                 Key: CAMEL-577
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-577
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0
>            Reporter: Freeman Fang
>             Fix For: 1.4.0
>
>         Attachments: CAMEL-577.patch
>
>
> in method of 
> protected void find(Test test, String packageName, ClassLoader loader) 
> it try to load class  from directory or jar, it works for standalone mode.
> But if the classloader of the method is osgi bundle class loader, it will fail since the getResource(packgename) return neither directory nor jar
> for example, package name is org/apache/camel/convert, then what returned is /org/apache/camel/convert, so both loadImplementationsInDirectory and loadImplementationsInJar doesn't work in this case

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