[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [equinox-dev] running startApp from equinox console
|
Hi Scott,
The ApplicationLauncher is registered by EclipseStarter. The ApplicationLauncher service is used by the application container to exec applications on the main VM thread. By default the applications in Eclipse are always run on the main thread.
But when running on the server there is no ability to take control of the main thread. When the servlet bridge launches equinox the ApplicationLauncher service is not registered and is not available to the application container. To launch your application in such an environment you must specify that your application can run on another thread besides main. To do this you add the thread=any attribute to the application tag ...
<application
cardinality="1"
thread="any"
visible="true">
I also recommend you set the cardinality to something other than the default "singleton-global" otherwise you will only be able to launch a single application at a time.
HTH
Tom
Scott Lewis ---08/27/2008 02:02:48 PM---I'm trying to setup an Equinox server and run startApp from within the
![]()
From: | ![]()
Scott Lewis <slewis@xxxxxxxxxxxxx> |
![]()
To: | ![]()
Equinox development mailing list <equinox-dev@xxxxxxxxxxx> |
![]()
Date: | ![]()
08/27/2008 02:02 PM |
![]()
Subject: | ![]()
[equinox-dev] running startApp from equinox console |
I'm trying to setup an Equinox server and run startApp from within the
console.
I'm successfully starting org.eclipse.equinox.app bundle upon framework
start, and so see the application commands in the console of the OSGi
server.
But when I give the startApp command in console, the exception below is
thrown. Here is the block of code from EclipseAppContainer (that is
doing the throwing). The launcherTracker.getService() call returns
null, and so the ApplicationException is thrown:
synchronized (this) {
appLauncher = (ApplicationLauncher)
launcherTracker.getService(); <-- This getService() returns null
if (appLauncher == null) { <-- this test succeeds
if (isDefault) { <-- this is false
// we need to wait to allow the
ApplicationLauncher to get registered;
// save the handle to be launched as soon as the
ApplicationLauncher is available
defaultMainThreadAppHandle = appHandle;
return;
}
throw new
ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR); <
}
curDefaultApplicationListener = defaultAppListener;
curMissingAppLauncher = missingAppLauncher;
}
So my question is...why does the launcherTracker return null? Is there
some other bundle that has to be started in order to have an
ApplicationLauncher registered? If so, which one?
Thanksinadvance,
Scott
exception
osgi> startApp org.eclipse.equinox.p2.installer.application
org.osgi.service.application.ApplicationException
at
org.eclipse.equinox.internal.app.EclipseAppContainer.launch(EclipseAppContainer.java:322)
at
org.eclipse.equinox.internal.app.EclipseAppDescriptor.launchSpecific(EclipseAppDescriptor.java:93)
at
org.osgi.service.application.ApplicationDescriptor.launch(ApplicationDescriptor.java:316)
at
org.eclipse.equinox.internal.app.AppCommands._startApp(AppCommands.java:183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:223)
at java.lang.Thread.run(Unknown Source)
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

