|Event Admin is null when debugging in eclipse, not in command line [message #625359]
||Mon, 05 July 2010 12:58
| George Valkanas
Registered: July 2010
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:
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,
Powered by FUDForum
. Page generated in 0.06742 seconds