Hi,
unlike normal bundles, fragments do not have their own class loader and
instead are accessed via their host's class loader.

When the framework resolves a bundle, it searches the installed
bundles to see if there
are any fragments for it.
said this, removes the bundle activator, platform import pakage ecc.ecc.

If you still have problems tell me that i send you an axample

cheers

-Filippo


2012/5/28 Shripati Bhat <[email protected]>:
> Hi Filippo,
>
>       Thanks for the reply.. :)
>
> But this thing isn't solving the problem.
> My MANIFEST.MF now looks like
>
> Manifest-Version: 1
> Bnd-LastModified: 1338215495052
> Build-Jdk: 1.7.0_04-ea
> Built-By: shripati.bhat
> Bundle-Activator: com.smx.test.MyActivator
> Bundle-ManifestVersion: 2
> Bundle-Name: Test_Log_Bundle_Name
> Bundle-SymbolicName: Test_Log_Symb_Name
> Bundle-Version: 1.0.0
> Created-By: Apache Maven Bundle Plugin
> Export-Package: com.smx.log.service;uses:="org.apache.log4j";ve
>  rsion="1.0.0",com.smx.log.core;uses:="org.apache.log4j,org.cod
>  ehaus.jackson.map,org.apache.log4j.spi,org.apache.log4j.helpers";versio
>  n="1.0.0"
> Fragment-Host: org.ops4j.pax.logging.pax-logging-service
> Import-Package: org.apache.log4j;version="[
>  1.2,2)",org.apache.log4j.helpers,org.apache.log4j.spi;version="[1.2,2)"
>  ,org.codehaus.jackson.map;version="[1.9,2)",org.osgi.framework;version=
>  "[1.5,2)"
> Tool: Bnd-1.43.0
>
>
>
> Now when I start ServiceMix with my custom bundle, I get
>
> ERROR: Bundle org.ops4j.pax.logging.pax-logging-service [3] Error starting
> mvn:org.ops4j.pax.logging/pax-logging-service/1.6.3
> (org.osgi.framework.BundleException: A
> ctivator start error in bundle org.ops4j.pax.logging.pax-logging-service
> [3].)
> java.lang.NoClassDefFoundError:
> org/ops4j/pax/logging/service/internal/AppenderBridgeImpl
>        at
> org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.configureDefaults(PaxLoggingServiceImpl.java:251)
>        at
> org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.<init>(PaxLoggingServiceImpl.java:61)
>        at
> org.ops4j.pax.logging.service.internal.Activator.start(Activator.java:108)
>        at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
>        at org.apache.felix.framework.Felix.activateBundle(Felix.java:1842)
>        at org.apache.felix.framework.Felix.startBundle(Felix.java:1759)
>        at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)
>        at
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>        at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.ClassNotFoundException:
> org.ops4j.pax.logging.service.internal.AppenderBridgeImpl not found by
> org.ops4j.pax.logging.pax-logging-api [4]
>        at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
>        at
> org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
>        at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>        ... 9 more
>
>
> When I checked both the pax-logging-api and pax-logging-service bundles,
> they seemed fine with all classes in place. And if I start servicemix
> without my custom bundle, It starts fine.
>
> Am I doing something wrong?
>
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/ServiceMix4-4-Custom-RollingFileAppender-and-Layout-help-tp5713390p5713392.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to