Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Communications Framework (ECF) » Event Admin is null when debugging in eclipse, not in command line(potential problem)
Event Admin is null when debugging in eclipse, not in command line [message #544761] Mon, 05 July 2010 12:58 Go to next message
George Valkanas is currently offline George ValkanasFriend
Messages: 3
Registered: July 2010
Junior Member
Hello everyone,

I did a little research, both on google and in this forum to find a similar strange-looking behavior, but with no success (google keywords: "event admin null debugging in eclipse", "event admin problem eclipse" and some more). This is why I began a new thread. In case someone is familiar with the problem (and / or a previous discussion), let me know.


The observed problem is as follows:

We are developping a set of services / middleware for a project we currently have (IPAC - ipac.di.uoa.gr for anyone interested). Part of the communication is performed with service references and method calls, whereas the other part is via the Event Admin service.

Dependencies are correctly resolved and all the required bundles are in place (at least we do not get any such errors).

When starting our services, some of them require a reference to the Event Admin service. The strange thing is that, when debugging the services through the Eclipse platform (or even running it), the reference to the Event Admin is *null*, 99% of the times (I've seen it work, but only in one occasion)! Even if we stop and restart the service (with OSGi commands "stop X", "start X") after some time (in case event admin was not started - which is never the case as we observe), the reference is again *null*!

On the contrary, if we run the exact same services without modification on the command line, the Event Admin reference is correctly retrieved *all of the times*.
The command line execution is performed as:

java -jar org.eclipse.osgi.jar -console

where org.eclipse.osgi.jar is simply the file org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar renamed.


The eclipse bundles that we use include, apart from the file above, the following:

org.eclipse.equinox.event_1.1.0.v20080225.jar
org.eclipse.osgi.services.jar_3.1.200.v20071203.jar
org.eclipse.osgi.util_3.1.300.v20080303.jar

The Eclipse Platform used is Ganymede v3.4.2, Milestone 20090211-170, tested on an Ubuntu Linux 8.10 laptop, with Sun JDK 1.6, update 20.
The hardware is an Intel dual core @1,86GHz, with 2Gb RAM, in case it makes any difference.


Thank you very much,
George
Re: Event Admin is null when debugging in eclipse, not in command line [message #544859 is a reply to message #544761] Mon, 05 July 2010 17:49 Go to previous messageGo to next message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
On 07/05/2010 02:58 PM, George Valkanas wrote:
> Hello everyone,
>
> I did a little research, both on google and in this forum to find a
> similar strange-looking behavior, but with no success (google keywords:
> "event admin null debugging in eclipse", "event admin problem eclipse"
> and some more). This is why I began a new thread. In case someone is
> familiar with the problem (and / or a previous discussion), let me know.
>
>
> The observed problem is as follows:
>
> We are developping a set of services / middleware for a project we
> currently have (IPAC - ipac.di.uoa.gr for anyone interested). Part of
> the communication is performed with service references and method calls,
> whereas the other part is via the Event Admin service.
>
> Dependencies are correctly resolved and all the required bundles are in
> place (at least we do not get any such errors).
>
> When starting our services, some of them require a reference to the
> Event Admin service. The strange thing is that, when debugging the
> services through the Eclipse platform (or even running it), the
> reference to the Event Admin is *null*, 99% of the times (I've seen it
> work, but only in one occasion)! Even if we stop and restart the service
> (with OSGi commands "stop X", "start X") after some time (in case event
> admin was not started - which is never the case as we observe), the
> reference is again *null*!
>
> On the contrary, if we run the exact same services without modification
> on the command line, the Event Admin reference is correctly retrieved
> *all of the times*.
> The command line execution is performed as:
>
> java -jar org.eclipse.osgi.jar -console
>
> where org.eclipse.osgi.jar is simply the file
> org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar renamed.
>
>
> The eclipse bundles that we use include, apart from the file above, the
> following:
>
> org.eclipse.equinox.event_1.1.0.v20080225.jar
> org.eclipse.osgi.services.jar_3.1.200.v20071203.jar
> org.eclipse.osgi.util_3.1.300.v20080303.jar
>
> The Eclipse Platform used is Ganymede v3.4.2, Milestone 20090211-170,
> tested on an Ubuntu Linux 8.10 laptop, with Sun JDK 1.6, update 20.
> The hardware is an Intel dual core @1,86GHz, with 2Gb RAM, in case it
> makes any difference.
>
>
> Thank you very much,
> George

Hi George,

this newsgroup is about the Eclipse Communication Framework (ECF) which
is not the home of the Equinox EventAdmin implementation. You will have
better luck with your question over at their newsgroup/forum [0]. You
might want to check bugzilla first, if your problem is known already [1].

Markus

[0] http://www.eclipse.org/forums/index.php?t=thread&frm_id= 31&
[1] https://bugs.eclipse.org/bugs/query.cgi (classification "RT",
component "equinox")
Re: Event Admin is null when debugging in eclipse, not in command line [message #544902 is a reply to message #544761] Tue, 06 July 2010 00:17 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1023
Registered: July 2009
Senior Member
Hi George,

It seems that you are using a very old version of EventAdmin and Equinox
(i.e. the Ganymede version). I would suggest trying a more recent
version of Equinox/EventAdmin (as well as consulting the resources on
Equinox as suggested by Markus K).

Also, just in case it's interesting to you for your project...ECF/this
forum *is* the home of the Distributed Event Admin implementation...i.e.

http://wiki.eclipse.org/Distributed_EventAdmin_Service

Scott


George Valkanas wrote:
> Hello everyone,
>
> I did a little research, both on google and in this forum to find a
> similar strange-looking behavior, but with no success (google keywords:
> "event admin null debugging in eclipse", "event admin problem eclipse"
> and some more). This is why I began a new thread. In case someone is
> familiar with the problem (and / or a previous discussion), let me know.
>
>
> The observed problem is as follows:
>
> We are developping a set of services / middleware for a project we
> currently have (IPAC - ipac.di.uoa.gr for anyone interested). Part of
> the communication is performed with service references and method calls,
> whereas the other part is via the Event Admin service.
>
> Dependencies are correctly resolved and all the required bundles are in
> place (at least we do not get any such errors).
>
> When starting our services, some of them require a reference to the
> Event Admin service. The strange thing is that, when debugging the
> services through the Eclipse platform (or even running it), the
> reference to the Event Admin is *null*, 99% of the times (I've seen it
> work, but only in one occasion)! Even if we stop and restart the service
> (with OSGi commands "stop X", "start X") after some time (in case event
> admin was not started - which is never the case as we observe), the
> reference is again *null*!
>
> On the contrary, if we run the exact same services without modification
> on the command line, the Event Admin reference is correctly retrieved
> *all of the times*.
> The command line execution is performed as:
>
> java -jar org.eclipse.osgi.jar -console
>
> where org.eclipse.osgi.jar is simply the file
> org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar renamed.
>
>
> The eclipse bundles that we use include, apart from the file above, the
> following:
>
> org.eclipse.equinox.event_1.1.0.v20080225.jar
> org.eclipse.osgi.services.jar_3.1.200.v20071203.jar
> org.eclipse.osgi.util_3.1.300.v20080303.jar
>
> The Eclipse Platform used is Ganymede v3.4.2, Milestone 20090211-170,
> tested on an Ubuntu Linux 8.10 laptop, with Sun JDK 1.6, update 20.
> The hardware is an Intel dual core @1,86GHz, with 2Gb RAM, in case it
> makes any difference.
>
>
> Thank you very much,
> George
Re: Event Admin is null when debugging in eclipse, not in command line [message #625360 is a reply to message #544761] Mon, 05 July 2010 17:49 Go to previous messageGo to next message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
On 07/05/2010 02:58 PM, George Valkanas wrote:
> Hello everyone,
>
> I did a little research, both on google and in this forum to find a
> similar strange-looking behavior, but with no success (google keywords:
> "event admin null debugging in eclipse", "event admin problem eclipse"
> and some more). This is why I began a new thread. In case someone is
> familiar with the problem (and / or a previous discussion), let me know.
>
>
> The observed problem is as follows:
>
> We are developping a set of services / middleware for a project we
> currently have (IPAC - ipac.di.uoa.gr for anyone interested). Part of
> the communication is performed with service references and method calls,
> whereas the other part is via the Event Admin service.
>
> Dependencies are correctly resolved and all the required bundles are in
> place (at least we do not get any such errors).
>
> When starting our services, some of them require a reference to the
> Event Admin service. The strange thing is that, when debugging the
> services through the Eclipse platform (or even running it), the
> reference to the Event Admin is *null*, 99% of the times (I've seen it
> work, but only in one occasion)! Even if we stop and restart the service
> (with OSGi commands "stop X", "start X") after some time (in case event
> admin was not started - which is never the case as we observe), the
> reference is again *null*!
>
> On the contrary, if we run the exact same services without modification
> on the command line, the Event Admin reference is correctly retrieved
> *all of the times*.
> The command line execution is performed as:
>
> java -jar org.eclipse.osgi.jar -console
>
> where org.eclipse.osgi.jar is simply the file
> org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar renamed.
>
>
> The eclipse bundles that we use include, apart from the file above, the
> following:
>
> org.eclipse.equinox.event_1.1.0.v20080225.jar
> org.eclipse.osgi.services.jar_3.1.200.v20071203.jar
> org.eclipse.osgi.util_3.1.300.v20080303.jar
>
> The Eclipse Platform used is Ganymede v3.4.2, Milestone 20090211-170,
> tested on an Ubuntu Linux 8.10 laptop, with Sun JDK 1.6, update 20.
> The hardware is an Intel dual core @1,86GHz, with 2Gb RAM, in case it
> makes any difference.
>
>
> Thank you very much,
> George

Hi George,

this newsgroup is about the Eclipse Communication Framework (ECF) which
is not the home of the Equinox EventAdmin implementation. You will have
better luck with your question over at their newsgroup/forum [0]. You
might want to check bugzilla first, if your problem is known already [1].

Markus

[0] http://www.eclipse.org/forums/index.php?t=thread&frm_id= 31&
[1] https://bugs.eclipse.org/bugs/query.cgi (classification "RT",
component "equinox")
Re: Event Admin is null when debugging in eclipse, not in command line [message #625361 is a reply to message #544761] Tue, 06 July 2010 00:17 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1023
Registered: July 2009
Senior Member
Hi George,

It seems that you are using a very old version of EventAdmin and Equinox
(i.e. the Ganymede version). I would suggest trying a more recent
version of Equinox/EventAdmin (as well as consulting the resources on
Equinox as suggested by Markus K).

Also, just in case it's interesting to you for your project...ECF/this
forum *is* the home of the Distributed Event Admin implementation...i.e.

http://wiki.eclipse.org/Distributed_EventAdmin_Service

Scott


George Valkanas wrote:
> Hello everyone,
>
> I did a little research, both on google and in this forum to find a
> similar strange-looking behavior, but with no success (google keywords:
> "event admin null debugging in eclipse", "event admin problem eclipse"
> and some more). This is why I began a new thread. In case someone is
> familiar with the problem (and / or a previous discussion), let me know.
>
>
> The observed problem is as follows:
>
> We are developping a set of services / middleware for a project we
> currently have (IPAC - ipac.di.uoa.gr for anyone interested). Part of
> the communication is performed with service references and method calls,
> whereas the other part is via the Event Admin service.
>
> Dependencies are correctly resolved and all the required bundles are in
> place (at least we do not get any such errors).
>
> When starting our services, some of them require a reference to the
> Event Admin service. The strange thing is that, when debugging the
> services through the Eclipse platform (or even running it), the
> reference to the Event Admin is *null*, 99% of the times (I've seen it
> work, but only in one occasion)! Even if we stop and restart the service
> (with OSGi commands "stop X", "start X") after some time (in case event
> admin was not started - which is never the case as we observe), the
> reference is again *null*!
>
> On the contrary, if we run the exact same services without modification
> on the command line, the Event Admin reference is correctly retrieved
> *all of the times*.
> The command line execution is performed as:
>
> java -jar org.eclipse.osgi.jar -console
>
> where org.eclipse.osgi.jar is simply the file
> org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar renamed.
>
>
> The eclipse bundles that we use include, apart from the file above, the
> following:
>
> org.eclipse.equinox.event_1.1.0.v20080225.jar
> org.eclipse.osgi.services.jar_3.1.200.v20071203.jar
> org.eclipse.osgi.util_3.1.300.v20080303.jar
>
> The Eclipse Platform used is Ganymede v3.4.2, Milestone 20090211-170,
> tested on an Ubuntu Linux 8.10 laptop, with Sun JDK 1.6, update 20.
> The hardware is an Intel dual core @1,86GHz, with 2Gb RAM, in case it
> makes any difference.
>
>
> Thank you very much,
> George
icon6.gif  Re: Event Admin is null when debugging in eclipse, not in command line [message #652768 is a reply to message #544761] Sun, 06 February 2011 15:33 Go to previous message
bingo  is currently offline bingo Friend
Messages: 1
Registered: February 2011
Junior Member
1. try modify "bundle start level" in "Debug Configurations"->"Bundles"

2. subscriber bundle level must be higher than publisher bundle
Rolling Eyes
Previous Topic:ECF + OSGI + TCP Socket
Next Topic:installation of ECF 3.4 problems
Goto Forum:
  


Current Time: Wed Jun 20 12:05:39 GMT 2018

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

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

Back to the top