Home » Eclipse Projects » Equinox » Declarative Services and NoClassDefFoundError
| | | | | | | |
Re: Declarative Services and NoClassDefFoundError [message #103552 is a reply to message #103528] |
Tue, 08 January 2008 01:59 |
David Donohue Messages: 104 Registered: July 2009 |
Senior Member |
|
|
Jaime,
I had to remove your 2 @Override annotations from org.bundle1.impl.Class1, and then it seems to work. A glitch with my Eclipse OSGi run dialog prevents me from inactivating either of the 2 DS bundles, so the DS service gets activated twice.
osgi> Hello world from bundle 1
Hello world from bundle 2
Activating the component 3
Hello world from bundle 1
Hello world from bundle 2
Activating the component 3
ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.0.v20070530
1 ACTIVE bundle3_1.0.0
2 ACTIVE org.eclipse.equinox.ds_1.0.0.v20060828
3 ACTIVE org.eclipse.osgi.services_3.1.200.v20070605
4 ACTIVE bundle2_1.0.0
6 ACTIVE bundle1_1.0.0
7 ACTIVE org.eclipse.equinox.ds_1.0.0.v20070226
So yes, you have proven that my NoClassDefFoundError is not merely an issue with a DS interface extending an interface from another bundle.
So my problem must be something different. Unfortunately I have tried many other details (use import-package instead of require-bundle, separate component from the service into separate bundles, etc., etc.) and cannot isolate the problem. I did discover that my code runs properly inside the Equinox runtimeenvironment but not in my standalone Equinox/OSGi app, whereas your bundle1,2,3 code works in both places.
Not sure where to go from here. I suppose I will try to just redesign my bundle and see if I can work around the problem. If I discover the cause I will post it here.
Many thanks for your help, Jaime!
David
|
|
| |
Re: Declarative Services and NoClassDefFoundError [message #103602 is a reply to message #103574] |
Wed, 09 January 2008 03:13 |
David Donohue Messages: 104 Registered: July 2009 |
Senior Member |
|
|
Jaime,
I tried your Bundle-NativeCode header but no help. Here is my config.ini
osgi.bundles=plugins/org.eclipse.equinox.common.jar@1:start, plugins/org.eclipse.equinox.registry_3.3.0.v20070522.jar@1:start, plugins/org.eclipse.update.configurator.jar@1:start, plugins/org.eclipse.equinox.http.jetty_1.0.0.20071010-2241.jar@2:start, plugins/com.antilia.wicketstarter@2:start, plugins/com.antilia.demo@2:start, plugins/org.eclipse.equinox.ds_1.0.0.v20070226.jar@2:start
eclipse.ignoreApp=true
Below is my console output. Again my thanks for your hard work on my problem.
David
ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.3.0.v20070530
1 ACTIVE org.eclipse.equinox.common_3.3.0.v20070426
2 ACTIVE org.eclipse.equinox.registry_3.3.0.v20070522
3 ACTIVE org.eclipse.update.configurator_3.2.101.R33x_v20070810
4 ACTIVE org.eclipse.equinox.http.jetty_1.0.0.20071010-2241
5 ACTIVE com.antilia.wicketstarter_1.0.0
6 ACTIVE com.antilia.demo_1.0.0
7 ACTIVE org.eclipse.equinox.ds_1.0.0.v20070226
8 <<LAZY>> com.antilia.common_1.0.0
10 <<LAZY>> com.antilia.web_1.0.0
12 RESOLVED javax.servlet_2.4.0.20071010-2241
13 RESOLVED org.apache.commons.logging_1.0.4.20071010-2241
14 <<LAZY>> org.eclipse.equinox.app_1.0.1.R33x_v20070828
18 RESOLVED org.eclipse.equinox.http.registry_1.0.0.20071010-2241
19 <<LAZY>> org.eclipse.equinox.http.servlet_1.0.0.20071010-2241
20 <<LAZY>> org.eclipse.equinox.preferences_3.2.100.v20070522
22 RESOLVED org.eclipse.osgi.services_3.1.200.v20070605
24 RESOLVED org.inqle.core_1.0.0
25 RESOLVED org.inqle.core.ds_1.0.0
26 RESOLVED org.inqle.db_1.0.0
27 RESOLVED org.inqle.user.data.extraction.ordfp_1.0.0
28 <<LAZY>> org.inqle.user.data.rdf.jena_1.0.0
29 RESOLVED org.inqle.user.domain.workflow_1.0.0
30 RESOLVED org.mortbay.jetty_5.1.11.20071010-2241
osgi> start 27
Started org.inqle.user.data.extraction.ordfp.Activator.
osgi> java.lang.NoClassDefFoundError: org/inqle/user/data/rdf/persistence/IPersistable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:161)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:501)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:471)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:430)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:413)
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.BundleLoader.findCl assInternal(BundleLoader.java:408)
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 java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:161)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:501)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:471)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:430)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:413)
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.BundleLoader.findCl assInternal(BundleLoader.java:408)
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 java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:161)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:501)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:471)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:430)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:413)
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.BundleLoader.findCl assInternal(BundleLoader.java:408)
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 org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:289)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1269)
at org.eclipse.equinox.ds.instance.BuildDispose.createInstance( BuildDispose.java:255)
at org.eclipse.equinox.ds.instance.BuildDispose.buildComponentC onfigInstance(BuildDispose.java:114)
at org.eclipse.equinox.ds.instance.InstanceProcess.registerComp onentConfigurations(InstanceProcess.jav
a:145)
at org.eclipse.equinox.ds.resolver.Resolver.dispatchWork(Resolv er.java:701)
at org.eclipse.equinox.ds.workqueue.WorkQueue$Queued.dispatch(W orkQueue.java:57)
at org.eclipse.equinox.ds.workqueue.WorkQueue.run(WorkQueue.jav a:108)
Running addInterface1()...
Hello world from bundle 1
Activating DataExtractionStrategyDecider...
osgi> services
{org.osgi.service.packageadmin.PackageAdmin}={service.rankin g=2147483647, service.pid=0.org.eclipse.osgi.frame
work.internal.core.PackageAdminImpl, service.vendor=Eclipse.org, service.id=1}
Registered by bundle: System Bundle [0]
Bundles using service:
System Bundle [0]
initial@reference :file:plugins/org.eclipse.equinox.registry_3.3.0.v20070522.j ar/ [2]
initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [3]
initial@reference:file:plugins/org.eclipse.equinox.ds_1.0.0.v20070226.jar/ [7]
{org.osgi.service.startlevel.StartLevel}={service.ranking=21 47483647, service.pid=0.org.eclipse.osgi.framework
internal.core.StartLevelManager, service.vendor=Eclipse.org, service.id=2}
Registered by bundle: System Bundle [0]
Bundles using service:
System Bundle [0]
{org.eclipse.osgi.framework.log.FrameworkLog}={service.ranki ng=2147483647, service.pid=0.org.eclipse.core.runt
ime.adaptor.EclipseLog, service.vendor=Eclipse.org, service.id=3}
Registered by bundle: System Bundle [0]
Bundles using service:
initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [3]
{org.eclipse.osgi.framework.log.FrameworkLog}={service.ranki ng=-2147483648, performance=true, service.pid=46or
g.eclipse.core.runtime.adaptor.EclipseLog, service.vendor=Eclipse.org, service.id=4}
Registered by bundle: System Bundle [0]
No bundles using service.
{javax.xml.parsers.SAXParserFactory}={service.id=5}
Registered by bundle: System Bundle [0]
Bundles using service:
initial@reference :file:plugins/org.eclipse.equinox.registry_3.3.0.v20070522.j ar/ [2]
initial@reference:file:plugins/org.eclipse.equinox.ds_1.0.0.v20070226.jar/ [7]
{javax.xml.parsers.DocumentBuilderFactory}={service.id=6}
Registered by bundle: System Bundle [0]
No bundles using service.
{org.eclipse.osgi.service.datalocation.Location}={type=osgi. user.area, service.id=7}
Registered by bundle: System Bundle [0]
No bundles using service.
{org.eclipse.osgi.service.datalocation.Location}={type=osgi. instance.area, service.id=8}
Registered by bundle: System Bundle [0]
No bundles using service.
{org.eclipse.osgi.service.datalocation.Location}={type=osgi. configuration.area, service.id=9}
Registered by bundle: System Bundle [0]
Bundles using service:
initial@reference :file:plugins/org.eclipse.equinox.registry_3.3.0.v20070522.j ar/ [2]
initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [3]
{org.eclipse.osgi.service.datalocation.Location}={type=osgi. install.area, service.id=10}
Registered by bundle: System Bundle [0]
Bundles using service:
initial@reference:file:plugins/org.eclipse.equinox.common.jar/ [1]
initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [3]
{org.eclipse.osgi.service.urlconversion.URLConverter}={proto col=[bundleentry,bundleresource], service.id=11}
Registered by bundle: System Bundle [0]
No bundles using service.
{org.eclipse.osgi.service.environment.EnvironmentInfo}={serv ice.ranking=2147483647, service.pid=0.org.eclipse.
core.runtime.internal.adaptor.EclipseEnvironmentInfo, service.vendor=Eclipse.org, service.id=12}
Registered by bundle: System Bundle [0]
No bundles using service.
{org.eclipse.osgi.service.resolver.PlatformAdmin}={service.r anking=2147483647, service.pid=0.org.eclipse.osgi.
internal.baseadaptor.StateManager, service.vendor=Eclipse.org, service.id=13}
Registered by bundle: System Bundle [0]
Bundles using service:
initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [3]
{org.eclipse.osgi.service.pluginconversion.PluginConverter}= {service.ranking=2147483647, service.pid=0.org.ecl
ipse.core.runtime.internal.adaptor.PluginConverterImpl, service.vendor=Eclipse.org, service.id=14}
Registered by bundle: System Bundle [0]
No bundles using service.
{org.eclipse.osgi.framework.console.CommandProvider}={servic e.ranking=2147483647, service.pid=0.org.eclipse.co
re.runtime.internal.adaptor.EclipseCommandProvider, service.vendor=Eclipse.org, service.id=15}
Registered by bundle: System Bundle [0]
Bundles using service:
System Bundle [0]
{org.eclipse.osgi.service.localization.BundleLocalization}={ service.ranking=2147483647, service.pid=0.org.ecli
pse.core.runtime.internal.adaptor.BundleLocalizationImpl, service.vendor=Eclipse.org, service.id=16}
Registered by bundle: System Bundle [0]
Bundles using service:
initial@reference:file:plugins/org.eclipse.equinox.common.jar/ [1]
{org.eclipse.osgi.internal.provisional.verifier.CertificateV erifierFactory}={service.id=17}
Registered by bundle: System Bundle [0]
No bundles using service.
{org.eclipse.osgi.internal.provisional.verifier.CertificateT rustAuthority}={service.ranking=-2147483648, osgi.
certificate.trust.authority=org.eclipse.osgi, service.id=18}
Registered by bundle: System Bundle [0]
No bundles using service.
{org.eclipse.osgi.framework.console.CommandProvider}={servic e.ranking=2147483647, service.id=19}
Registered by bundle: System Bundle [0]
Bundles using service:
System Bundle [0]
{org.eclipse.osgi.service.urlconversion.URLConverter}={proto col=platform, service.id=20}
Registered by bundle: initial@reference:file:plugins/org.eclipse.equinox.common.jar/ [1]
Bundles using service:
initial@reference:file:plugins/org.eclipse.equinox.common.jar/ [1]
{org.eclipse.core.runtime.IAdapterManager}={service.id=21}
Registered by bundle: initial@reference:file:plugins/org.eclipse.equinox.common.jar/ [1]
No bundles using service.
{org.osgi.service.url.URLStreamHandlerService}={url.handler. protocol=[platform], service.id=22}
Registered by bundle: initial@reference:file:plugins/org.eclipse.equinox.common.jar/ [1]
Bundles using service:
System Bundle [0]
{org.eclipse.core.runtime.IExtensionRegistry}={service.id=23 }
Registered by bundle: initial@reference :file:plugins/org.eclipse.equinox.registry_3.3.0.v20070522.j ar/ [2]
No bundles using service.
{org.eclipse.osgi.framework.console.CommandProvider}={servic e.id=24}
Registered by bundle: initial@reference :file:plugins/org.eclipse.equinox.registry_3.3.0.v20070522.j ar/ [2]
Bundles using service:
System Bundle [0]
{org.eclipse.update.configurator.IPlatformConfigurationFacto ry}={service.id=25}
Registered by bundle: initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [3]
No bundles using service.
{org.eclipse.core.runtime.IBundleGroupProvider}={service.id= 26}
Registered by bundle: initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [3]
No bundles using service.
{org.osgi.service.cm.ManagedServiceFactory}={service.pid=org .eclipse.equinox.http.jetty.config, service.id=27}
Registered by bundle: initial@reference :file:plugins/org.eclipse.equinox.http.jetty_1.0.0.20071010- 2241.jar/
[4]
No bundles using service.
{org.osgi.service.cm.ConfigurationListener}={service.id=28}
Registered by bundle: initial@reference:file:plugins/org.eclipse.equinox.ds_1.0.0.v20070226.jar/ [7]
No bundles using service.
{org.inqle.user.data.extraction.ordfp.Interface1}={component .name=Class1, component.id=1, service.id=29}
Registered by bundle: update@plugins/org.inqle.user.data.extraction.ordfp/ [27]
Bundles using service:
update@plugins/org.inqle.user.data.extraction.ordfp/ [27]
|
|
| |
Goto Forum:
Current Time: Wed Sep 25 05:16:17 GMT 2024
Powered by FUDForum. Page generated in 0.04657 seconds
|