Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Starting Equinox OSGI environment
Starting Equinox OSGI environment [message #538712] Tue, 08 June 2010 13:16 Go to next message
Stephan Arenswald is currently offline Stephan Arenswald
Messages: 11
Registered: July 2009
Junior Member
Hi All,

I'm trying to start Equinox programatically but I get the following error:

java.lang.NullPointerException
at
org.eclipse.osgi.internal.baseadaptor.BaseStorage.readStateD ata(BaseStorage.java:743)
at
org.eclipse.osgi.internal.baseadaptor.BaseStorage.getStateMa nager(BaseStorage.java:698)
at org.eclipse.osgi.baseadaptor.BaseAdaptor.getState(BaseAdapto r.java:390)
at
org.eclipse.core.runtime.adaptor.EclipseStarter$1.bundleChan ged(EclipseStarter.java:307)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.d ispatchEvent(BundleContextImpl.java:1234)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEv entSynchronous(ListenerQueue.java:141)
at
org.eclipse.osgi.framework.internal.core.Framework.publishBu ndleEventPrivileged(Framework.java:1518)
at
org.eclipse.osgi.framework.internal.core.Framework$6.run(Fra mework.java:1473)
at java.security.AccessController.doPrivileged(AccessController .java:197)
at
org.eclipse.osgi.framework.internal.core.Framework.publishBu ndleEvent(Framework.java:1471)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:281)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.l aunch(StartLevelManager.java:247)
at
org.eclipse.osgi.framework.internal.core.SystemBundle.resume (SystemBundle.java:201)
at
org.eclipse.osgi.framework.internal.core.Framework.launch(Fr amework.java:644)
at org.eclipse.osgi.framework.internal.core.OSGi.launch(OSGi.ja va:51)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Ecli pseStarter.java:313)
at
test.com.ibm.db2pm.server.statementtracker.zos.plugin.OsgiSe rverConnector$1.run(OsgiServerConnector.java:77)

It seems that the context is null at that position
(BaseStorage.java:743) but I cannot set the context because
EclipseStarter.startup() is creating one and returning it to me.

I'm pretty sure that I missed something somewhere. The following code
snipped shows my code:

System.setProperty("osgi.parentClassloader", "fwk");
System.setProperty("org.osgi.framework.bootdelegation", "*");
System.setProperty("osgi.compatibility.bootdelegation", "true");
System.setProperty("osgi.clean", "true");
System.setProperty("osgi.install.area", "...");
System.setProperty("osgi.configuration.area", "...");
System.setProperty("eclipse.ignoreApp", Boolean.toString(true));
System.setProperty("eclipse.consoleLog", Boolean.toString(true));

EclipseStarter.startup(new String[] {"-noconsole"}, null);


Thanks in advanced


Regards
arens
Re: Starting Equinox OSGI environment [message #538770 is a reply to message #538712] Tue, 08 June 2010 14:56 Go to previous message
Stephan Arenswald is currently offline Stephan Arenswald
Messages: 11
Registered: July 2009
Junior Member
Just an update:

I should have said before that I try to start Equinox from an ANT script
that I start from within Eclipse. When I try to start Equinox using a
JAVA task with fork=true Equinox starts without any problems. That's why
I think that it has something todo with the fact that my IDE and the
Equinox I try to start share the same JVM. May this be the case? If yes,
can I force Equinox to create a new/separate Context?

Regards,
arens
Previous Topic:HyperLink, setEnabled and it's visual response
Next Topic:MultiPageEditorActionBarContributor - setGlobalActionHandler not working
Goto Forum:
  


Current Time: Tue Sep 23 14:45:22 GMT 2014

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

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