Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Debugging in OSGI -- not all bundles starting
Debugging in OSGI -- not all bundles starting [message #70156] Mon, 17 July 2006 18:56 Go to next message
Eclipse UserFriend
Originally posted by: ksshams.gmail.com

Hello,
When I launch the framework within Eclipse, I am able to start my
bundles properly. However, once I run osgi using the bridge servlet, I
start having trouble. I was able to deploy a simple servlet on tomcat,
with the help of people in this news group, but I am having trouble
adding dependencies. I repeatedly get NoClassDefFoundError exception on
one of my own bundle classes. My intuition and investigation suggests
that one of the other bundle that my bundle depends on is not loaded
properly. What bothers me is that I can start sample.http, which
depends on these bundles, and I can get the status to show as active.
However, I get the ProxyServlet Not Found error in the browser, which I
am guessing is due to the missing bundles.
Our plugins make extensive use of the Eclipse's core plug-ins,
including but not limited to UI plug-ins. The servlet does not need to
use any of the UI plug-ins, but it has dependencies on plug-ins that
depend on the UI-plugins. I went through and started as many bundles as
I could once the osgi prompt came up, but I am still unable to load
several bundles.
1) Am I allowed to use Eclipse's UI plug-ins in my osgi framework?
2) Is there a standard way to do this? Currently, we have features
that define the list of plugins that we need from Eclipse. I added the
features into our features folder (WEB-INF/platform/features), and I
added an includes feature tag in the
org.eclipse.equinox.servlet.bridge.feature_1.0.0. I also exported the
feature from within eclipse and added all the jar files to our
WEB-INF/platform/plugins folder. Does this sound okay?

3) When I start the framework within Eclipse, I am able to load all my
bundles. However, things are messed up within tomcat. Is there a
remote debugging feature that will let me debug the deployment within
tomcat? I need more fine grained debugging than what SS is giving me
right now.


Here is the result of SS:

id State Bundle
0 ACTIVE system.bundle_3.2.0.v20060601
Fragments=45
1 ACTIVE org.eclipse.equinox.common_3.2.0.v20060603
2 ACTIVE org.eclipse.update.configurator_3.2.0.v20060605
3 ACTIVE
org.eclipse.equinox.servlet.bridge.http_3.2.0.200607131428
4 ACTIVE org.eclipse.equinox.http.registry_3.2.0.200607131428
5 ACTIVE sample.http_1.0.0
6 RESOLVED com.ibm.icu_3.4.4.1
7 RESOLVED gov.nasa.ensemble.core.common_1.0.15.200607171016
8 RESOLVED gov.nasa.ensemble.core.frame_1.0.11.200607131430
9 RESOLVED gov.nasa.ensemble.core.hibernate.tool_1.0.7.200607131430
10 RESOLVED gov.nasa.ensemble.core.hibernate_1.0.13.200607131430
11 RESOLVED
gov.nasa.ensemble.core.planning.database.preferences_1.0.8.
00607131430
12 RESOLVED gov.nasa.ensemble.core.rcp_1.0.15.200607131430
13 RESOLVED gov.nasa.ensemble.mars.common_1.0.0.200607131430
14 INSTALLED gov.nasa.ensemble.mer_1.0.15.200607131430
15 INSTALLED gov.nasa.jpl.maestro.core.dataproduct_1.0.0.200607131430
16 INSTALLED gov.nasa.jpl.maestro.core.jai_1.0.6.200607131430
17 RESOLVED gov.nasa.jpl.maestro.core.testdata_1.0.0
18 INSTALLED gov.nasa.jpl.maestro.mer.dataproduct_1.0.15.200607131430
19 ACTIVE javax.media.jai_1.0.0
20 ACTIVE javax.vecmath_1.0.0
21 ACTIVE net.sf.antcontrib.cpptasks_1.0.1
22 ACTIVE net.sf.antcontrib_1.0.2
23 ACTIVE org.apache.ant_1.6.5
24 ACTIVE org.apache.commons.httpclient_2.0.2.3
25 ACTIVE org.apache.commons.lang_2.0.1
26 ACTIVE org.apache.commons.logging_1.0.1
27 ACTIVE org.apache.log4j_1.2.8.2
28 ACTIVE org.apache.lucene_1.4.103.v20060601
29 ACTIVE org.apache.xerces_2.6.3
30 ACTIVE org.eclipse.ant.core_3.1.100.v20060531
31 ACTIVE org.eclipse.core.commands_3.2.0.I20060605-1400
32 ACTIVE org.eclipse.core.contenttype_3.2.0.v20060603
33 ACTIVE org.eclipse.core.expressions_3.2.0.v20060605-1400
34 ACTIVE org.eclipse.core.filesystem_1.0.0.v20060601a
35 ACTIVE org.eclipse.core.jobs_3.2.0.v20060603
36 ACTIVE org.eclipse.core.resources_3.2.0.v20060601a
37 ACTIVE
org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060601
38 ACTIVE
org.eclipse.core.runtime.compatibility_3.1.100.v20060601a
39 ACTIVE org.eclipse.core.runtime_3.2.0.v20060603
40 ACTIVE org.eclipse.core.variables_3.1.100.v20060517
43 ACTIVE org.eclipse.equinox.preferences_3.2.0.v20060601
44 ACTIVE org.eclipse.equinox.registry_3.2.0.v20060601
45 RESOLVED org.eclipse.equinox.servlet.bridge.extensionbundle_3.2.0
Master=0
47 ACTIVE org.eclipse.help.appserver_3.1.100.v20060510b
48 ACTIVE org.eclipse.help.base_3.2.0.v20060601
49 RESOLVED org.eclipse.help.ui_3.2.0.v20060510b
50 RESOLVED org.eclipse.help.webapp_3.2.0.v20060510b
51 ACTIVE org.eclipse.help_3.2.0.v20060602
52 RESOLVED org.eclipse.jface.databinding_1.0.0.I20060605-1400
53 ACTIVE org.eclipse.jface_3.2.0.I20060605-1400
54 ACTIVE org.eclipse.osgi.services_3.1.100.v20060601
56 ACTIVE org.eclipse.rcp_3.2.0.v20060605
57 RESOLVED org.eclipse.swt.win32.win32.x86_3.2.0.v3232m
Master=58
58 ACTIVE org.eclipse.swt_3.2.0.v3232o
Fragments=57
59 ACTIVE org.eclipse.tomcat_4.1.130.v20060601
60 ACTIVE org.eclipse.ui.cheatsheets_3.2.0.v20060516
61 ACTIVE org.eclipse.ui.forms_3.2.0.v20060530
62 ACTIVE org.eclipse.ui.intro_3.2.0.v20060601
63 ACTIVE org.eclipse.ui.views_3.2.0.I20060511-2000
64 ACTIVE org.eclipse.ui.workbench_3.2.0.I20060605-1400
65 ACTIVE org.eclipse.ui_3.2.0.I20060605-1400
66 INSTALLED org.eclipse.update.configurator_3.2.0.v20060511
68 ACTIVE org.eclipse.update.core_3.2.0.v20060602
69 ACTIVE org.eclipse.update.ui_3.2.0.v20060601
70 ACTIVE org.exolab.castor_0.9.9.2
71 ACTIVE org.hibernate.tool_3.1.2
72 ACTIVE org.hibernate_3.1.4
73 ACTIVE org.hsqldb_1.7.2.5
74 ACTIVE org.jdom_1.0.1
75 ACTIVE org.junit_3.8.1



If I enter the command: start org.eclipse.update.configurator, there is
no message. However, subsequent ss only show the bundle as being
installed. Similarly, starting org.eclipse.swt.win32.win32.x86 gives
the following error:
osgi> start org.eclipse.swt.win32.win32.x86
org.osgi.framework.BundleException: A fragment bundle cannot be started:
update
plugins/org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar [57]
at
org.eclipse.osgi.framework.internal.core.BundleFragment.star tWorker(
undleFragment.java:224)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstra
tBundle.java:256)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._s
art(FrameworkCommandProvider.java:239)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAcce
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter
execute(FrameworkCommandInterpreter.java:145)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(
rameworkConsole.java:293)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(Fr
meworkConsole.java:278)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(Framew
rkConsole.java:213)
at java.lang.Thread.run(Thread.java:595)

Thanks in advance for your help.


Regards,
Khawaja Shams
Re: Debugging in OSGI -- not all bundles starting [message #70200 is a reply to message #70156] Mon, 17 July 2006 21:11 Go to previous message
Eclipse UserFriend
Originally posted by: simon.kaegi.cognos.com

Hi Khawaja,

The servlet bridge is meant to support server-side development whereas it
looks to me like you're trying to run an RCP app -- Maestro.
I suppose there's no real reason why you couldn't however it's not designed
or tested using UI elements like SWT or the eclipse.ui plugins.
That said... there's work (RAP, RSP-UI) that might allow re-use of these in
the future.

One thing I'd like to clarify is that the servletbridge and (sample.http)
does not require the whole org.eclipse.core.runtime or any of the UI
plugins -- just the requirements as specified in their manifests (e.g. an
OSGi framework (e.g. org.eclipse.osgi) and the OSGi Http Service). To start
integrating you should try to make your install smaller and then gradually
bring in components ensuring they resolve and start correctly.

For remote debugging in Tomcat you can use JPDA e.g. /bin/jpda.bat and the
excellent remote debug support provided by the Eclipse IDE.

The specific problem you bring up about update.configurator not being
started is because you have two instances present and it's a singleton (e.g.
"there can be only one" resolved).

HTH
-Simon


"Khawaja Shams" <ksshams@gmail.com> wrote in message
news:e9gmgr$d51$1@utils.eclipse.org...
> Hello,
> When I launch the framework within Eclipse, I am able to start my
> bundles properly. However, once I run osgi using the bridge servlet, I
> start having trouble. I was able to deploy a simple servlet on tomcat,
> with the help of people in this news group, but I am having trouble adding
> dependencies. I repeatedly get NoClassDefFoundError exception on one of
> my own bundle classes. My intuition and investigation suggests that one
> of the other bundle that my bundle depends on is not loaded properly.
> What bothers me is that I can start sample.http, which depends on these
> bundles, and I can get the status to show as active. However, I get the
> ProxyServlet Not Found error in the browser, which I am guessing is due to
> the missing bundles.
> Our plugins make extensive use of the Eclipse's core plug-ins,
> including but not limited to UI plug-ins. The servlet does not need to
> use any of the UI plug-ins, but it has dependencies on plug-ins that
> depend on the UI-plugins. I went through and started as many bundles as I
> could once the osgi prompt came up, but I am still unable to load several
> bundles.
> 1) Am I allowed to use Eclipse's UI plug-ins in my osgi framework?
> 2) Is there a standard way to do this? Currently, we have features that
> define the list of plugins that we need from Eclipse. I added the
> features into our features folder (WEB-INF/platform/features), and I added
> an includes feature tag in the
> org.eclipse.equinox.servlet.bridge.feature_1.0.0. I also exported the
> feature from within eclipse and added all the jar files to our
> WEB-INF/platform/plugins folder. Does this sound okay?
>
> 3) When I start the framework within Eclipse, I am able to load all my
> bundles. However, things are messed up within tomcat. Is there a remote
> debugging feature that will let me debug the deployment within tomcat? I
> need more fine grained debugging than what SS is giving me right now.
>
>
> Here is the result of SS:
>
> id State Bundle
> 0 ACTIVE system.bundle_3.2.0.v20060601
> Fragments=45
> 1 ACTIVE org.eclipse.equinox.common_3.2.0.v20060603
> 2 ACTIVE org.eclipse.update.configurator_3.2.0.v20060605
> 3 ACTIVE org.eclipse.equinox.servlet.bridge.http_3.2.0.200607131428
> 4 ACTIVE org.eclipse.equinox.http.registry_3.2.0.200607131428
> 5 ACTIVE sample.http_1.0.0
> 6 RESOLVED com.ibm.icu_3.4.4.1
> 7 RESOLVED gov.nasa.ensemble.core.common_1.0.15.200607171016
> 8 RESOLVED gov.nasa.ensemble.core.frame_1.0.11.200607131430
> 9 RESOLVED
> gov.nasa.ensemble.core.hibernate.tool_1.0.7.200607131430
> 10 RESOLVED gov.nasa.ensemble.core.hibernate_1.0.13.200607131430
> 11 RESOLVED
> gov.nasa.ensemble.core.planning.database.preferences_1.0.8.
> 00607131430
> 12 RESOLVED gov.nasa.ensemble.core.rcp_1.0.15.200607131430
> 13 RESOLVED gov.nasa.ensemble.mars.common_1.0.0.200607131430
> 14 INSTALLED gov.nasa.ensemble.mer_1.0.15.200607131430
> 15 INSTALLED
> gov.nasa.jpl.maestro.core.dataproduct_1.0.0.200607131430
> 16 INSTALLED gov.nasa.jpl.maestro.core.jai_1.0.6.200607131430
> 17 RESOLVED gov.nasa.jpl.maestro.core.testdata_1.0.0
> 18 INSTALLED
> gov.nasa.jpl.maestro.mer.dataproduct_1.0.15.200607131430
> 19 ACTIVE javax.media.jai_1.0.0
> 20 ACTIVE javax.vecmath_1.0.0
> 21 ACTIVE net.sf.antcontrib.cpptasks_1.0.1
> 22 ACTIVE net.sf.antcontrib_1.0.2
> 23 ACTIVE org.apache.ant_1.6.5
> 24 ACTIVE org.apache.commons.httpclient_2.0.2.3
> 25 ACTIVE org.apache.commons.lang_2.0.1
> 26 ACTIVE org.apache.commons.logging_1.0.1
> 27 ACTIVE org.apache.log4j_1.2.8.2
> 28 ACTIVE org.apache.lucene_1.4.103.v20060601
> 29 ACTIVE org.apache.xerces_2.6.3
> 30 ACTIVE org.eclipse.ant.core_3.1.100.v20060531
> 31 ACTIVE org.eclipse.core.commands_3.2.0.I20060605-1400
> 32 ACTIVE org.eclipse.core.contenttype_3.2.0.v20060603
> 33 ACTIVE org.eclipse.core.expressions_3.2.0.v20060605-1400
> 34 ACTIVE org.eclipse.core.filesystem_1.0.0.v20060601a
> 35 ACTIVE org.eclipse.core.jobs_3.2.0.v20060603
> 36 ACTIVE org.eclipse.core.resources_3.2.0.v20060601a
> 37 ACTIVE org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060601
> 38 ACTIVE org.eclipse.core.runtime.compatibility_3.1.100.v20060601a
> 39 ACTIVE org.eclipse.core.runtime_3.2.0.v20060603
> 40 ACTIVE org.eclipse.core.variables_3.1.100.v20060517
> 43 ACTIVE org.eclipse.equinox.preferences_3.2.0.v20060601
> 44 ACTIVE org.eclipse.equinox.registry_3.2.0.v20060601
> 45 RESOLVED
> org.eclipse.equinox.servlet.bridge.extensionbundle_3.2.0
> Master=0
> 47 ACTIVE org.eclipse.help.appserver_3.1.100.v20060510b
> 48 ACTIVE org.eclipse.help.base_3.2.0.v20060601
> 49 RESOLVED org.eclipse.help.ui_3.2.0.v20060510b
> 50 RESOLVED org.eclipse.help.webapp_3.2.0.v20060510b
> 51 ACTIVE org.eclipse.help_3.2.0.v20060602
> 52 RESOLVED org.eclipse.jface.databinding_1.0.0.I20060605-1400
> 53 ACTIVE org.eclipse.jface_3.2.0.I20060605-1400
> 54 ACTIVE org.eclipse.osgi.services_3.1.100.v20060601
> 56 ACTIVE org.eclipse.rcp_3.2.0.v20060605
> 57 RESOLVED org.eclipse.swt.win32.win32.x86_3.2.0.v3232m
> Master=58
> 58 ACTIVE org.eclipse.swt_3.2.0.v3232o
> Fragments=57
> 59 ACTIVE org.eclipse.tomcat_4.1.130.v20060601
> 60 ACTIVE org.eclipse.ui.cheatsheets_3.2.0.v20060516
> 61 ACTIVE org.eclipse.ui.forms_3.2.0.v20060530
> 62 ACTIVE org.eclipse.ui.intro_3.2.0.v20060601
> 63 ACTIVE org.eclipse.ui.views_3.2.0.I20060511-2000
> 64 ACTIVE org.eclipse.ui.workbench_3.2.0.I20060605-1400
> 65 ACTIVE org.eclipse.ui_3.2.0.I20060605-1400
> 66 INSTALLED org.eclipse.update.configurator_3.2.0.v20060511
> 68 ACTIVE org.eclipse.update.core_3.2.0.v20060602
> 69 ACTIVE org.eclipse.update.ui_3.2.0.v20060601
> 70 ACTIVE org.exolab.castor_0.9.9.2
> 71 ACTIVE org.hibernate.tool_3.1.2
> 72 ACTIVE org.hibernate_3.1.4
> 73 ACTIVE org.hsqldb_1.7.2.5
> 74 ACTIVE org.jdom_1.0.1
> 75 ACTIVE org.junit_3.8.1
>
>
>
> If I enter the command: start org.eclipse.update.configurator, there is no
> message. However, subsequent ss only show the bundle as being installed.
> Similarly, starting org.eclipse.swt.win32.win32.x86 gives the following
> error:
> osgi> start org.eclipse.swt.win32.win32.x86
> org.osgi.framework.BundleException: A fragment bundle cannot be started:
> update
> plugins/org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar [57]
> at
> org.eclipse.osgi.framework.internal.core.BundleFragment.star tWorker(
> undleFragment.java:224)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(Abstra
> tBundle.java:256)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._s
> art(FrameworkCommandProvider.java:239)
> at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAcce
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter
> execute(FrameworkCommandInterpreter.java:145)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(
> rameworkConsole.java:293)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(Fr
> meworkConsole.java:278)
> at
> org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(Framew
> rkConsole.java:213)
> at java.lang.Thread.run(Thread.java:595)
>
> Thanks in advance for your help.
>
>
> Regards,
> Khawaja Shams
Previous Topic:How to auto-startup a bundle in server-side?
Next Topic:Extension Points conversion to OSGI Service Registry
Goto Forum:
  


Current Time: Tue Apr 23 15:57:49 GMT 2024

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

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

Back to the top