3

I have an application which uses Equinox as an osgi framework for a while now. Until now I used the system property osgi.install.area to specify where my bundles are like so

${osgi.install.area}/
  plugins/
     org.eclipse.osgi_3.7.0.v20110613.jar
     ... my app bundles

Equinox then automatically uses ${osgi.install.area}/configuration as the configuration area.

Everything works fine.

Now I need to move the configuration area out of ${osgi.install.area} because that may be read-only and I thought it was as simple as setting ${osgi.configuration.area} to a suitable path but when I do this the application no longer starts and I have the following stack trace in the logs:

java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:150)
...  

The path is used because at that location the log file is created and a directory "org.eclipse.osgi".

Paths to bundles are referenced in my config.ini like so:

osgi.bundles=de.mycomp.app-0.6.0.20121116-1834.jar@start, ...

The error message does not really give a hint where to look. It must be something rather simple but I am rather clueless at the moment.

Thanks in advance,

Robert

Björn Pollex
  • 75,346
  • 28
  • 201
  • 283
user1573546
  • 523
  • 5
  • 13

1 Answers1

2

I tested changing the configuration area an existing osgi app and it worked, with the following argument below in the .ini file in the root of the install. Are you sure you are setting the config param correctly like this:

-Dosgi.configuration.area=c:\mytest

After doing that and running the app again, it created the folder and a new configuration.

Here is a copy of my .ini file that works, also it's important that osgi params come after and vm args.

-loglevel=trace
-vmargs
-Dosgi.configuration.area=c:\mytest
-Dorg.osgi.service.http.port=8094
-Declipse.ignoreApp=true
-Dosgi.noShutdown=true
-Dequinox.ds.print=true
Pang
  • 9,564
  • 146
  • 81
  • 122
Duncan Krebs
  • 3,366
  • 2
  • 33
  • 53
  • I'm having a very similar problem. Can you please help me with it? http://stackoverflow.com/questions/35387061/change-eclipse-folder-in-linux – Dan Bray Feb 14 '16 at 13:42