Hi,

I am using ehcache 2.5.1 to cache my objects. I've deployed on ServiceMix
4.3.

I am using the ServiceMix bundle version of Ehcache, which has the headers
set as follows


    karaf@root> osgi:headers 281 | more  
      
    Apache ServiceMix :: Bundles :: ehcache (281)  
    ---------------------------------------------  
    Manifest-Version = 1.0  
    Bnd-LastModified = 1333038240996  
    Tool = Bnd-1.50.0  
    Built-By = jbonofre  
    Build-Jdk = 1.6.0_26  
    DynamicImport-Packages = *  
    Created-By = Apache Maven Bundle Plugin  
      
    Bundle-Vendor = The Apache Software Foundation  
    Bundle-Name = Apache ServiceMix :: Bundles :: ehcache  
    Bundle-DocURL = http://www.apache.org/  
    Bundle-Description = This OSGi bundle wraps ehcache 2.5.1 jar file.  
    Bundle-SymbolicName = org.apache.servicemix.bundles.ehcache  
    Bundle-Version = 2.5.1.1  
    Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt  
    Bundle-ManifestVersion = 2  
      
    Import-Package =  
            javax.jms;resolution:=optional,  
            javax.management,  
            javax.management.openmbean,  
            javax.naming,  
            ...  



I have made sure that my bundle exports the offending package:

    karaf@root> packages:exports 282  
        ID Packages  
       282 a.b; version=1.0.0.SNAPSHOT  
       282 a.b.c; version=1.0.0.SNAPSHOT  

And yet I still get the runtime error:

    Caused by: java.lang.ClassNotFoundException: a.b.SomeClass not found by
org.apache.servicemix.bundles.ehcache [281]  
            at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812)
  
            at
org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)  
            at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1806)
  
            at
java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]  
            at java.lang.Class.forName0(Native Method)[:1.6.0_26]  
            at java.lang.Class.forName(Class.java:247)[:1.6.0_26]  
            at
net.sf.ehcache.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:129)  
            at
net.sf.ehcache.util.PreferTCCLObjectInputStream.resolveClass(PreferTCCLObjectInputStream.java:44)
  


What am I missing?

cheers,
Kato



--
View this message in context: 
http://servicemix.396122.n5.nabble.com/OSGi-ClassNotFoundException-despite-using-DynamicImport-Packages-tp5715060.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to