[ 
https://issues.apache.org/jira/browse/FELIX-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224599#comment-13224599
 ] 

Richard S. Hall commented on FELIX-3378:
----------------------------------------

Sounds like that Protege code is expecting to run on Equinox, then. You could 
add the Equinox JAR file to the class path and boot delegate that specific 
package too and see if that gets you any further.

And, yes, the org.eclipse... package is part of the Equinox framework, but it 
may export the package from its system bundle so that bundles can import it, I 
have no idea.

I'd try the above suggestion, just to see if it makes a difference, but if the 
code in question has internal dependencies on Equinox-specific functionality 
then it may not work correctly even if you give it the class that it is 
expecting.
                
> 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

        

Reply via email to