[
https://issues.apache.org/jira/browse/FELIX-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224503#comment-13224503
]
Richard S. Hall commented on FELIX-3378:
----------------------------------------
It's not clear to me why you are loading an Equinox OSGi framework class while
running on the Felix framework, but ignoring that fact for now...
Are you saying you are trying to load a class from a bundle in your class that
was loaded by the application class loader? If so, there is no way that is
going to work, since the application class loader does not have access to
bundle classes.
Perhaps if your code is intended to run on Equinox, then perhaps that is why it
is trying to load an Equinox-specific class, not sure.
You could also try a newer version of Felix, since that would make it easier
for us to debug.
> class in bootclasspath cannot load osgi framework class
> -------------------------------------------------------
>
> Key: FELIX-3378
> URL: https://issues.apache.org/jira/browse/FELIX-3378
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Environment: Windows7,64bit. Java 1.6 jdk, Protege 4.1, Felix 2.0.4,
> OSGi R4
> Reporter: dave c
> Labels: newbie
>
> I work on a java profiler project. We have added our package to the
> bootdelegation path, so our code is found even though no explicit reference
> exists to our package. The problem seems to come when our code tries to load
> a class that is not our own.
> I am profiling Protege 4.1. We have some code running in a background thread
> which gets this error. I looked at the felix code for ModuleImpl, and find
> nothing obvious. Is there something I'm doing wrong that prevents our thread
> from finding this class? Or is this a limitation of the OSGi framework?
> java.lang.NoClassDefFoundError:
> org/eclipse/osgi/framework/console/CommandProvider
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(Unknown Source)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1872)
> at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:758)
> at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
> at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1733)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> com.myprofiler.InstrumentedMethod.registerForClassDeathNotification(InstrumentedMethod.java:311)
> at
> com.myprofiler.InstrumentedMethod.createDeathNotificationsForNewMethods(InstrumentedMethod.java:116)
> at
> com.myprofiler.MyProfilerApplication$PeriodicBufferProcessingThread.run(MyProfilerApplication.java:403)
> Caused by: java.lang.ClassNotFoundException:
> org.eclipse.osgi.framework.console.CommandProvider
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1554)
> at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:765)
> at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
> at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1733)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> ... 11 more
>
>
> According to the maanifest in the bundled felix.jar:
> Bundle-Version: 2.0.4
> Bundle-Name: Apache Felix
> Bundle-Description: OSGi R4 framework.
> Build-Jdk: 1.5.0_22
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira