Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Nullpointer Exception starting equinox
Nullpointer Exception starting equinox [message #533603] Fri, 14 May 2010 16:10 Go to next message
Eclipse UserFriend
Originally posted by: andre.dietisheim.gmail.com

Hi everybody

I try to migrate an osgi that currently runs on felix towards equinox.
Unfortunately I ran into a NullPointer exception while starting equinox
programmatically.
I use equinox 3.5 and I run it in a custom jar (created my own jar und
unpacked the equinox classes into it).

java.lang.NullPointerException
at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage
(BaseAdaptor.java:121)
at org.eclipse.osgi.framework.internal.core.Framework.initializ e
(Framework.java:185)
at org.eclipse.osgi.framework.internal.core.Framework.<init>
(Framework.java:157)
at
org.eclipse.osgi.framework.internal.core.EquinoxLauncher.int ernalInit
(EquinoxLauncher.java:68)
at org.eclipse.osgi.framework.internal.core.EquinoxLauncher$1.r un
(EquinoxLauncher.java:42)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.ini t
(EquinoxLauncher.java:40)
at org.eclipse.osgi.launch.Equinox.init(Equinox.java:89)
at org.apache.clerezza.platform.launcher.Main.startFramework
(Main.java:295)
at org.apache.clerezza.platform.launcher.Main.main(Main.java:21 0)

I stepped through the code and tracked the exact code. Its the code where
equinox tries to initialize the storage:

Framework#initializeStorage:

public void initializeStorage() throws IOException {
storage.initialize(this);
}

storage is actually NULL

I checked my configuration options and added the following options that
point to my home-dir on my linux machine (in hope that this dir is surely
writable and shouldn't cause any problem):

configProps.put("osgi.framework", "/home/trisa/workspaces/
clerezza/trunk/org.apache.clerezza.parent/
org.apache.clerezza.platform.launcher.tdb");
configProps.put("osgi.install.area", "/home/trisa/workspaces/
clerezza/trunk/org.apache.clerezza.parent/
org.apache.clerezza.platform.launcher.tdb");
configProps.put("osgi.configuration.area","/home/trisa/workspaces/
clerezza/trunk/org.apache.clerezza.parent/
org.apache.clerezza.platform.launcher.tdb");

Unofrtunately still no success. I'm currently running out of ideas and
I'd appreciate any help/hints a lot!

Thanks in advance
André
Re: Nullpointer Exception starting equinox [message #533958 is a reply to message #533603] Mon, 17 May 2010 14:54 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
The Equinox framework has a number of hooks that allow framework extensions to be installed which add to the framework implementation. The BaseAdaptor provides these hooks and much of the framework is implemented using these hooks. This includes the BaseStorage.

There is a file in the org.eclipse.osgi jar (called hookconfigurators.properties) which configures the built-in hook implementations. The org.eclipse.osgi.internal.baseadaptor.BaseHookConfigurator must be configured into the framework. I suggest you include all of the root resource files included in the org.eclipse.osgi jar (*.properties, *.profile files etc.) in your own custom jar.

You may also need to use the MANIFEST/MANIFEST.MF of org.eclipse.osgi. The best thing to do is to keep the org.eclipse.osgi jar intact to use directly and not to explode it into a custom jar.

HTH.
Previous Topic:can't find equinox documentations... :-(
Next Topic:Plug-in hot loading management tool
Goto Forum:
  


Current Time: Fri Sep 20 23:25:15 GMT 2024

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

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

Back to the top