Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Works in Knopflerfish but NoClassDefFoundError in Eqinox
Works in Knopflerfish but NoClassDefFoundError in Eqinox [message #87658] Sat, 05 May 2007 22:19 Go to next message
Ali S is currently offline Ali SFriend
Messages: 7
Registered: July 2009
Junior Member
I get

java.lang.NoClassDefFoundError:
org/apache/jackrabbit/core/TransientRepository

when I try to start my bundle in Equinox.

That class is in jackrabbit-core-1.0.jar that is in ./lib of my jar and I
have put it in classpath in MANIFEST.MF:

Bundle-ClassPath: .,
./lib/jackrabbit-core-1.0.jar

It works fine in knopflerfish.

Any help appreciated.

Full stack trace is:

org.osgi.framework.BundleException: Exception in
ir.alisakebi.wos.app.blog.core.Activator.start() of bundle ir.alisakebi
wos.app.blog.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1010)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:966)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java
:145)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:293)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:278)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:213)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoClassDefFoundError:
org/apache/jackrabbit/core/TransientRepository
at
ir.alisakebi.wos.app.blog.core.Activator.connectRepository(A ctivator.java:64)
at
ir.alisakebi.wos.app.blog.core.Activator.startSession(Activa tor.java:85)
at
ir.alisakebi.wos.app.blog.core.Activator.start(Activator.jav a:39)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:991)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:985)
... 13 more
Nested Exception:
java.lang.NoClassDefFoundError:
org/apache/jackrabbit/core/TransientRepository
at
ir.alisakebi.wos.app.blog.core.Activator.connectRepository(A ctivator.java:64)
at
ir.alisakebi.wos.app.blog.core.Activator.startSession(Activa tor.java:85)
at
ir.alisakebi.wos.app.blog.core.Activator.start(Activator.jav a:39)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:991)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:985)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:966)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java
:145)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:293)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:278)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:213)
at java.lang.Thread.run(Thread.java:595)
Nested Exception:
java.lang.NoClassDefFoundError:
org/apache/jackrabbit/core/TransientRepository
at
ir.alisakebi.wos.app.blog.core.Activator.connectRepository(A ctivator.java:64)
at
ir.alisakebi.wos.app.blog.core.Activator.startSession(Activa tor.java:85)
at
ir.alisakebi.wos.app.blog.core.Activator.start(Activator.jav a:39)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:991)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:985)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:966)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:256)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java
:145)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:293)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:278)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:213)
at java.lang.Thread.run(Thread.java:595)
Re: Works in Knopflerfish but NoClassDefFoundError in Eqinox [message #87677 is a reply to message #87658] Sat, 05 May 2007 23:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

That can happen e.g. if your class is found but it executes a static initialiser (i.e. a public static final assignment) that uses another class that's not exported by the system bundle. You could try using 'javap' to find out what it is.

I seem to recall that KF system bundle exports all packages it finds on the classpath, whereas Equinox doesn't. You can specify a configuration (more at http://wiki.eclipse.org/index.php/Equinox_Boot_Delegation). Alternatively, it needs a package that you've not imported.

Alex
Re: Works in Knopflerfish but NoClassDefFoundError in Eqinox [message #88351 is a reply to message #87677] Fri, 18 May 2007 15:40 Go to previous messageGo to next message
Ali S is currently offline Ali SFriend
Messages: 7
Registered: July 2009
Junior Member
Thanks for response, but I still cannot make it running!

I have added
osgi.compatibility.bootdelegation=false
and
org.osgi.framework.bootdelegation=java.*
lines to ./configuration/config.ini.

Can u plz elaborate what I need to do?
Re: Works in Knopflerfish but NoClassDefFoundError in Eqinox [message #88499 is a reply to message #88351] Mon, 21 May 2007 20:18 Go to previous message
Ali S is currently offline Ali SFriend
Messages: 7
Registered: July 2009
Junior Member
The problem was with './' before in
Bundle-ClassPath: ., ./lib/jackrabbit-core-1.0.jar
!!!
Also few problem with 'org.osgi.framework.bootdelegation' configuration.
Previous Topic:Encoding problems
Next Topic:How to register a HttpSessionListener
Goto Forum:
  


Current Time: Tue Apr 23 13:07:21 GMT 2024

Powered by FUDForum. Page generated in 0.02638 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top