It doesn't fail to resolve the package, the package is never imported by "Crank Request Engine", so it fails to find it when it tries to use it; thus the NCDFE.

You should modify the bundle to import this package. KF works because it is either boot delegating this package or is broken...probably the former.

-> richard

Ray Racine wrote:
I have some bundles which install and activate without issue on knopflerfish
but fails as follows on felix from failing to resolve the javax.management
package.

I thought the  java and javax packages were part of the frameworks system
bundle/classloader.  Why would javax.management.MBeanRegistration fail to
resolve?

The "packages" command clearly shows javax.management is exported.

Same bundles work fine in Knopflerfish.

Thanks,

Ray

# Main bundle which fails to active but is simple wrapper of
# Grizzly bundle below.

Manifest-Version: 1.0
Built-By: ray
Created-By: Apache Maven Bundle Plugin
Bundle-Activator: com.officedepot.crank.request.CrankRequestActivator
Import-Package: com.officedepot.crank.request,com.officedepot.crank.st
 orage.spi,com.sun.grizzly.http,com.sun.grizzly.tcp,com.sun.grizzly.tc
 p.http11,com.sun.grizzly.util.buf,com.sun.grizzly.util.http,org.osgi.
 framework;version="1.3",scala,scala.runtime
Bnd-LastModified: 1224607494928
Export-Package: com.officedepot.crank.request;uses:="com.sun.grizzly.u
 til.http,com.sun.grizzly.util.buf,org.osgi.framework,scala,com.sun.gr
 izzly.tcp,com.sun.grizzly.tcp.http11,com.officedepot.crank.storage.sp
 i,com.sun.grizzly.http,scala.runtime"
Bundle-Version: 0.1.0.SNAPSHOT
Bundle-Name: Crank Request Engine
Build-Jdk: 1.5.0_11
Bundle-ManifestVersion: 2
Bundle-SymbolicName: crank.com.officedepot.crank.crank-request
Tool: Bnd-0.0.255

# Grizzly Bundle which has the JMX code

Export-Package: com.sun.grizzly,
 com.sun.grizzly.tcp,
 com.sun.grizzly.http,
 com.sun.grizzly.util.buf,
 com.sun.grizzly.util.http,
 com.sun.grizzly.tcp.http11
Import-Package: javax.management
Created-By: jarbash
Built-By: rracine
Build-Jdk: 1.5.0
mode: development
package: com.sun.grizzly
Bundle-Name: grizzly
Bundle-SymbolicName: com.sun.grizzly
Bundle-Version: 1.8.6.1
Bundle-ManifestVersion: 2

-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.2.1)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.0.2)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.0.2)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.2.0)
[   5] [Active     ] [    1]
file:/usr/local/scala-2.7.2.RC2/misc/sbaz/scala-library.jar
[   7] [Active     ] [    1] Scala Library (2.7.2.RC2)
[   9] [Active     ] [    1] Crank Common Classes (0.1.0.SNAPSHOT)
[  10] [Active     ] [    1] Crank Bundle Service Provider Interfaces
(0.1.0.SNAPSHOT)
[  12] [Resolved   ] [    1] Crank Request Engine (0.1.0.SNAPSHOT)
[  14] [Active     ] [    1] grizzly (1.8.6.1)
-> start 12
INITING REQUEST SERVICE
org.osgi.framework.BundleException: Activator start error.
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1651)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1541)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:371)
        at
org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:82)
        at
org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:276)
        at
org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:167)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoClassDefFoundError:
javax/management/MBeanRegistration
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at
org.apache.felix.framework.searchpolicy.ContentClassLoader.findClass(ContentClassLoader.java:214)
        at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClassFromModule(ContentClassLoader.java:85)
        at
org.apache.felix.framework.searchpolicy.ContentLoaderImpl.getClass(ContentLoaderImpl.java:162)
        at
org.apache.felix.framework.searchpolicy.R4Wire.getClass(R4Wire.java:101)
        at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.searchImports(R4SearchPolicyCore.java:505)
        at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:466)
        at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)
        at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
        at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at
com.officedepot.crank.request.CrankRequestService.createSelectorThread(CrankRequestService.scala:27)
        at
com.officedepot.crank.request.CrankRequestService.<init>(CrankRequestService.scala:23)
        at
com.officedepot.crank.request.CrankRequestActivator.<init>(CrankRequestActivator.scala:19)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at
org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3504)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1602)
        ... 6 more
java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
->


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to