Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Where is my Application?
Where is my Application? [message #104905] Sun, 10 February 2008 20:42 Go to next message
Jeff Lowcock is currently offline Jeff Lowcock
Messages: 10
Registered: July 2009
Junior Member
I'm new at this OSGI thing so be gentle. I have created a very simple
bundle that has an Activator and an Application each of these classes
simply print a message in the start and stop methods I am trying to see
that all of the life cycle methods are called as I expect.

The Activator works correctly however the Application is not recognised
and hence is not listed using the apps command in osgi.

I have read all of the tutorials, news groups and articles I could find
and I am now totally confused because many of these are up to one year old
so I suspect I am doing something wrong at a quite basic level. Some
documents refer to an extension point "org.eclipse.equinox.applications"
others refer to the older "org.eclipse.core.runtime.applications". I have
tried both an neither works. Lastly I cannot see the
org.eclipse.equinox.app jar in the selection list when I am trying to
create an extension point which indicates to me that I have some sort of
compatability issue. However I only downloaded and updated the most
recent stable release so again I am a little stumped.

I am using 3.3.1.1 and I have copied the various jars from the eclipse
directories to a separate area to ensure that I understand which jars are
required.

This is the Application.java

package com.ias.server;

import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;

public class Application
implements IApplication
{

public Object start(IApplicationContext context)
throws Exception
{
System.out.println("Start IAS Application");
return null;
}

public void stop()
{
System.out.println("Close IAS Application");
}

}


This is the config.ini I have

osgi.bundles=org.eclipse.equinox.app,org.eclipse.equinox.com mon,org.eclipse.equinox.preferences,org.eclipse.equinox.regi stry,org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.runtime@start,org.eclipse.core.runtime.compatibility.auth,com.ias.server@start

This is the plugin.xml I have also checked this agains the plugin.xml in
the org.eclipse.equinox.app jar and they appear to be similar. I did this
because this error application from the equinox jar is the only
application seen when the apps command is executed.

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
id="com.ias.server.application"
name="IAS Server Application"
point="org.eclipse.core.runtime.applications">
<application
cardinality="singleton-global"
thread="main"
visible="false">
<run class="com.ias.server.Application">
</run>
</application>
</extension>

</plugin>


This is the trace I get:

!SESSION 2008-02-11 11:24:31.093
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_AU
Framework arguments: -application=com.ias.server.application
Command-line arguments: -console -application=com.ias.server.application

!ENTRY org.eclipse.osgi 4 0 2008-02-11 11:24:31.609
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: No application id has been found.
at
org.eclipse.equinox.internal.app.EclipseAppContainer.startDe faultApp(EclipseAppContainer.java:236)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.start(E clipseAppContainer.java:98)
at
org.eclipse.equinox.internal.app.Activator.addingService(Act ivator.java:112)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
at org.eclipse.equinox.internal.app.Activator.start(Activator.j ava:54)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:260)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:417)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:405)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at
org.eclipse.core.internal.runtime.PlatformActivator.startApp Container(PlatformActivator.java:47)
at
org.eclipse.core.internal.runtime.PlatformActivator.start(Pl atformActivator.java:32)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:350)
at
org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1118)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:634)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:508)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:282)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:468)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:195)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:297)

I am at a loss of where to go next for information or resources so any
help would be muchly appreciated.
Re: Where is my Application? [message #104929 is a reply to message #104905] Mon, 11 February 2008 05:35 Go to previous messageGo to next message
Eclipse User
Originally posted by: martin.roth.access.unizh.ch

Hi,

you need to specify the value "eclipse.application" in config.ini. i
guess this has too look something like that in your case:

eclipse.application=com.ias.server.application

cheers,
martin



Jeff schrieb:
> I'm new at this OSGI thing so be gentle. I have created a very simple
> bundle that has an Activator and an Application each of these classes
> simply print a message in the start and stop methods I am trying to see
> that all of the life cycle methods are called as I expect.
>
> The Activator works correctly however the Application is not recognised
> and hence is not listed using the apps command in osgi.
>
> I have read all of the tutorials, news groups and articles I could find
> and I am now totally confused because many of these are up to one year
> old so I suspect I am doing something wrong at a quite basic level.
> Some documents refer to an extension point
> "org.eclipse.equinox.applications" others refer to the older
> "org.eclipse.core.runtime.applications". I have tried both an neither
> works. Lastly I cannot see the org.eclipse.equinox.app jar in the
> selection list when I am trying to create an extension point which
> indicates to me that I have some sort of compatability issue. However I
> only downloaded and updated the most recent stable release so again I am
> a little stumped.
>
> I am using 3.3.1.1 and I have copied the various jars from the eclipse
> directories to a separate area to ensure that I understand which jars
> are required.
>
> This is the Application.java
>
> package com.ias.server;
>
> import org.eclipse.equinox.app.IApplication;
> import org.eclipse.equinox.app.IApplicationContext;
>
> public class Application
> implements IApplication
> {
>
> public Object start(IApplicationContext context)
> throws Exception {
> System.out.println("Start IAS Application");
> return null;
> }
>
> public void stop() {
> System.out.println("Close IAS Application");
> }
>
> }
>
>
> This is the config.ini I have
>
> osgi.bundles=org.eclipse.equinox.app,org.eclipse.equinox.com mon,org.eclipse.equinox.preferences,org.eclipse.equinox.regi stry,org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.runtime@start,org.eclipse.core.runtime.compatibility.auth,com.ias.server@start
>
>
> This is the plugin.xml I have also checked this agains the plugin.xml in
> the org.eclipse.equinox.app jar and they appear to be similar. I did
> this because this error application from the equinox jar is the only
> application seen when the apps command is executed.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.2"?>
> <plugin>
> <extension
> id="com.ias.server.application"
> name="IAS Server Application"
> point="org.eclipse.core.runtime.applications">
> <application cardinality="singleton-global"
> thread="main"
> visible="false">
> <run class="com.ias.server.Application">
> </run>
> </application>
> </extension>
>
> </plugin>
>
>
> This is the trace I get:
>
> !SESSION 2008-02-11 11:24:31.093
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.6.0_03
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_AU
> Framework arguments: -application=com.ias.server.application
> Command-line arguments: -console -application=com.ias.server.application
>
> !ENTRY org.eclipse.osgi 4 0 2008-02-11 11:24:31.609
> !MESSAGE Application error
> !STACK 1
> java.lang.RuntimeException: No application id has been found.
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.startDe faultApp(EclipseAppContainer.java:236)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.start(E clipseAppContainer.java:98)
>
> at
> org.eclipse.equinox.internal.app.Activator.addingService(Act ivator.java:112)
>
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
>
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
>
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
> at org.eclipse.equinox.internal.app.Activator.start(Activator.j ava:54)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
>
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
>
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:260)
>
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:417)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:340)
>
> at
> org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:405)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> at
> org.eclipse.core.internal.runtime.PlatformActivator.startApp Container(PlatformActivator.java:47)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator.start(Pl atformActivator.java:32)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
>
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
>
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:350)
>
> at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1118)
>
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:634)
>
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:508)
>
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:282)
>
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:468)
>
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:195)
>
> at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:297)
>
>
> I am at a loss of where to go next for information or resources so any
> help would be muchly appreciated.
>
>
Re: Where is my Application? [message #105065 is a reply to message #104905] Mon, 11 February 2008 23:48 Go to previous message
Simon Kaegi is currently offline Simon Kaegi
Messages: 381
Registered: July 2009
Senior Member
Hi Jeff,

Have you set "eclipse.application.registerDescriptors= true"?
See
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/misc/runtime-options.html

HTH
-Simon

"Jeff" <jeff.lowcock@yahoo.com> wrote in message
news:582b8e190cb95c483140ef70850a50e2$1@www.eclipse.org...
> I'm new at this OSGI thing so be gentle. I have created a very simple
> bundle that has an Activator and an Application each of these classes
> simply print a message in the start and stop methods I am trying to see
> that all of the life cycle methods are called as I expect.
>
> The Activator works correctly however the Application is not recognised
> and hence is not listed using the apps command in osgi.
>
> I have read all of the tutorials, news groups and articles I could find
> and I am now totally confused because many of these are up to one year old
> so I suspect I am doing something wrong at a quite basic level. Some
> documents refer to an extension point "org.eclipse.equinox.applications"
> others refer to the older "org.eclipse.core.runtime.applications". I have
> tried both an neither works. Lastly I cannot see the
> org.eclipse.equinox.app jar in the selection list when I am trying to
> create an extension point which indicates to me that I have some sort of
> compatability issue. However I only downloaded and updated the most
> recent stable release so again I am a little stumped.
>
> I am using 3.3.1.1 and I have copied the various jars from the eclipse
> directories to a separate area to ensure that I understand which jars are
> required.
>
> This is the Application.java
>
> package com.ias.server;
>
> import org.eclipse.equinox.app.IApplication;
> import org.eclipse.equinox.app.IApplicationContext;
>
> public class Application
> implements IApplication
> {
>
> public Object start(IApplicationContext context) throws Exception {
> System.out.println("Start IAS Application");
> return null;
> }
>
> public void stop() {
> System.out.println("Close IAS Application");
> }
>
> }
>
>
> This is the config.ini I have
>
> osgi.bundles=org.eclipse.equinox.app,org.eclipse.equinox.com mon,org.eclipse.equinox.preferences,org.eclipse.equinox.regi stry,org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.runtime@start,org.eclipse.core.runtime.compatibility.auth,com.ias.server@start
>
> This is the plugin.xml I have also checked this agains the plugin.xml in
> the org.eclipse.equinox.app jar and they appear to be similar. I did this
> because this error application from the equinox jar is the only
> application seen when the apps command is executed.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.2"?>
> <plugin>
> <extension
> id="com.ias.server.application"
> name="IAS Server Application"
> point="org.eclipse.core.runtime.applications">
> <application cardinality="singleton-global"
> thread="main"
> visible="false">
> <run class="com.ias.server.Application">
> </run>
> </application>
> </extension>
>
> </plugin>
>
>
> This is the trace I get:
>
> !SESSION 2008-02-11
> 11:24:31.093 -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.6.0_03
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_AU
> Framework arguments: -application=com.ias.server.application
> Command-line arguments: -console -application=com.ias.server.application
>
> !ENTRY org.eclipse.osgi 4 0 2008-02-11 11:24:31.609
> !MESSAGE Application error
> !STACK 1
> java.lang.RuntimeException: No application id has been found.
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.startDe faultApp(EclipseAppContainer.java:236)
> at
> org.eclipse.equinox.internal.app.EclipseAppContainer.start(E clipseAppContainer.java:98)
> at
> org.eclipse.equinox.internal.app.Activator.addingService(Act ivator.java:112)
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(Ser viceTracker.java:1064)
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialSer vices(ServiceTracker.java:926)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:330)
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:274)
> at org.eclipse.equinox.internal.app.Activator.start(Activator.j ava:54)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:260)
> at
> org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:417)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:340)
> at
> org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:405)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> at
> org.eclipse.core.internal.runtime.PlatformActivator.startApp Container(PlatformActivator.java:47)
> at
> org.eclipse.core.internal.runtime.PlatformActivator.start(Pl atformActivator.java:32)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:350)
> at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1118)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:634)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:508)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:282)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:468)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:195)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:297)
>
> I am at a loss of where to go next for information or resources so any
> help would be muchly appreciated.
>
>
Previous Topic:OSGI Bundle use in a view
Next Topic:[security] - Trusted Bundles
Goto Forum:
  


Current Time: Wed Aug 20 22:26:57 EDT 2014

Powered by FUDForum. Page generated in 0.02357 seconds