在独立 Equinox 上加载 org.w3c.dom.Node 异常

发布于 2024-12-08 10:37:40 字数 17610 浏览 0 评论 0原文

当我的应用程序在 Equinox 上以独立模式运行时,它会启动 NoClassDefFoundError 来查找 org.w3c.dom.Node 类。

这个类是框架提供的吗?在命令行上,我运行了命令 getprop 并且此类列在 org.osgi.framework.system.packages 属性中。

我已经检查了 MANIFEST 文件中的导入标记,一切正常。

有什么想法吗?我做错了什么?

这里是 MANIFEST:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Protocol-sip-ds
Bundle-SymbolicName: es.umu.imsclient.protocol-sip-ds
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Description: A bundle that implements the Protocol Provider package over SIP.
Import-Package: EDU.oswego.cs.dl.util.concurrent,
 es.umu.mvia.imsclient.configuration.event,
 es.umu.mvia.imsclient.configuration.service,
 es.umu.mvia.imsclient.netaddr.service,
 es.umu.mvia.imsclient.service.protocol,
 es.umu.mvia.imsclient.service.protocol.event,
 es.umu.mvia.imsclient.util,
 javax.net.ssl,
 javax.xml.transform,
 org.osgi.framework,
 org.osgi.service.component;version="1.1.0",
 org.osgi.service.event,
 org.osgi.util.tracker,
 org.w3c.dom
Bundle-Vendor: ims-osgi-client
Bundle-ClassPath: .,
 lib/JainSipRi1.2.jar,
 lib/JainSipApi1.2.jar,
 lib/log4j-1.2.15.jar
Service-Component: OSGI-INF/component.xml

bundle [id] 的输出:

osgi> bundle 13
es.umu.imsclient.protocol-sip-ds_1.0.0.qualifier [13]
  Id=13, Status=ACTIVE      Data     Root=C:\Users\gsit\Desktop\oasis\configuration\org.eclipse.osgi\bundles\13\data
  Registered Services
    {es.umu.mvia.imsclient.service.protocol.ProtocolProviderFactory}=   {component.name=protocol-sip-ds, component.id=7, service.id=42}
  Services in use:
    {org.osgi.service.event.EventAdmin}={component.name=org.eclipse.equinox.event,    component.id=11, service.id=41}
    {es.umu.mvia.imsclient.configuration.service.ConfigurationService}=  {component.name=es.umu.mvia.imsclient.configuration, component.id=0, service.id=35}
    {es.umu.mvia.imsclient.netaddr.service.NetworkAddressManagerService}=   {component.name=es.umu.mvia.imsclient.netaddr, component.id=6, service.id=36}

  No exported packages
  Imported packages
    EDU.oswego.cs.dl.util.concurrent; version="0.0.0"<Concurrent_1.0.0 [16]>
    es.umu.mvia.imsclient.configuration.event; version="0.0.0"  <es.umu.imsclient.configuration_1.2.0 [5]>
    es.umu.mvia.imsclient.configuration.service; version="0.0.0"   <es.umu.imsclient.configuration_1.2.0 [5]>
    es.umu.mvia.imsclient.netaddr.service; version="0.0.0"   <es.umu.imsclient.netaddr_1.2.0 [11]>
    es.umu.mvia.imsclient.service.protocol; version="0.0.0"  <es.umu.imsclient.protocol_1.2.0 [12]>
    es.umu.mvia.imsclient.service.protocol.event; version="0.0.0"<es.umu.imsclient.protocol_1.2.0 [12]>
    es.umu.mvia.imsclient.util; version="0.0.0"<es.umu.imsclient.util_1.2.0 [14]>
    javax.net.ssl; version="0.0.0"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
    javax.xml.transform; version="0.0.0"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
    org.osgi.framework; version="1.5.0"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
    org.osgi.service.component; version="1.1.0"  <org.eclipse.osgi.services_3.2.100.v20100503 [28]>
    org.osgi.service.event; version="1.2.0"<org.eclipse.osgi.services_3.2.100.v20100503   [28]>
    org.osgi.util.tracker; version="1.4.2"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
    org.w3c.dom; version="0.0.0"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
  No fragment bundles
  Named class space
    es.umu.imsclient.protocol-sip-ds; bundle-version="1.0.0.qualifier"[provided]
  No required bundles

以及 bundle 0 的输出:

...
  Exported packages
    org.eclipse.osgi.event; version="1.0.0"[exported]
    org.eclipse.osgi.framework.console; version="1.1.0"[exported]
    org.eclipse.osgi.framework.eventmgr; version="1.2.0"[exported]
    org.eclipse.osgi.framework.log; version="1.0.0"[exported]
    org.eclipse.osgi.launch; version="1.0.0"[exported]
    org.eclipse.osgi.service.datalocation; version="1.3.0"[exported]
    org.eclipse.osgi.service.debug; version="1.2.0"[exported]
    org.eclipse.osgi.service.environment; version="1.3.0"[exported]
    org.eclipse.osgi.service.localization; version="1.1.0"[exported]
    org.eclipse.osgi.service.pluginconversion; version="1.0.0"[exported]
    org.eclipse.osgi.service.resolver; version="1.4.0"[exported]
    org.eclipse.osgi.service.runnable; version="1.1.0"[exported]
    org.eclipse.osgi.service.security; version="1.0.0"[exported]
    org.eclipse.osgi.service.urlconversion; version="1.0.0"[exported]
    org.eclipse.osgi.signedcontent; version="1.0.0"[exported]
    org.eclipse.osgi.storagemanager; version="1.0.0"[exported]
    org.eclipse.osgi.util; version="1.1.0"[exported]
    org.osgi.framework; version="1.5.0"[exported]
    org.osgi.framework.launch; version="1.0.0"[exported]
    org.osgi.framework.hooks.service; version="1.0.0"[exported]
    org.osgi.service.condpermadmin; version="1.1.0"[exported]
    org.osgi.service.framework; version="1.0.0"[exported]
    org.osgi.service.packageadmin; version="1.2.0"[exported]
    org.osgi.service.permissionadmin; version="1.2.0"[exported]
    org.osgi.service.startlevel; version="1.1.0"[exported]
    org.osgi.service.url; version="1.0.0"[exported]
    org.osgi.util.tracker; version="1.4.0"[exported]
    org.osgi.util.tracker; version="1.4.2"[exported]
    org.eclipse.core.runtime.adaptor; version="0.0.0"[exported]
    org.eclipse.core.runtime.internal.adaptor; version="0.0.0"[exported]
    org.eclipse.core.runtime.internal.stats; version="0.0.0"[exported]
    org.eclipse.osgi.baseadaptor; version="0.0.0"[exported]
    org.eclipse.osgi.baseadaptor.bundlefile; version="0.0.0"[exported]
    org.eclipse.osgi.baseadaptor.hooks; version="0.0.0"[exported]
    org.eclipse.osgi.baseadaptor.loader; version="0.0.0"[exported]
    org.eclipse.osgi.framework.adaptor; version="0.0.0"[exported]
    org.eclipse.osgi.framework.debug; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.core; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.protocol; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.protocol.bundleentry; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.protocol.bundleresource; version="0.0.0"    [exported]
    org.eclipse.osgi.framework.internal.protocol.reference; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.reliablefile; version="0.0.0"[exported]
    org.eclipse.osgi.framework.util; version="0.0.0"[exported]
    org.eclipse.osgi.internal.baseadaptor; version="0.0.0"[exported]
    org.eclipse.osgi.internal.composite; version="0.0.0"[exported]
    org.eclipse.osgi.internal.loader; version="0.0.0"[exported]
    org.eclipse.osgi.internal.loader.buddy; version="0.0.0"[exported]
    org.eclipse.osgi.internal.module; version="0.0.0"[exported]
    org.eclipse.osgi.internal.profile; version="0.0.0"[exported]
    org.eclipse.osgi.internal.resolver; version="0.0.0"[exported]
    org.eclipse.osgi.internal.serviceregistry; version="0.0.0"[exported]
    org.eclipse.osgi.internal.permadmin; version="0.0.0"[exported]
    org.eclipse.osgi.internal.provisional.service.security; version="1.0.0"[exported]
    org.eclipse.osgi.internal.provisional.verifier; version="0.0.0"[exported]
    org.eclipse.osgi.internal.service.security; version="0.0.0"[exported]
    org.eclipse.osgi.internal.signedcontent; version="0.0.0"[exported]
    org.eclipse.osgi.service.internal.composite; version="0.0.0"[exported]
    javax.accessibility; version="0.0.0"[exported]
    javax.activation; version="0.0.0"[exported]
    javax.activity; version="0.0.0"[exported]
    javax.annotation; version="0.0.0"[exported]
    javax.annotation.processing; version="0.0.0"[exported]
    javax.crypto; version="0.0.0"[exported]
    javax.crypto.interfaces; version="0.0.0"[exported]
    javax.crypto.spec; version="0.0.0"[exported]
    javax.imageio; version="0.0.0"[exported]
    javax.imageio.event; version="0.0.0"[exported]
    javax.imageio.metadata; version="0.0.0"[exported]
    javax.imageio.plugins.bmp; version="0.0.0"[exported]
    javax.imageio.plugins.jpeg; version="0.0.0"[exported]
    javax.imageio.spi; version="0.0.0"[exported]
    javax.imageio.stream; version="0.0.0"[exported]
    javax.jws; version="0.0.0"[exported]
    javax.jws.soap; version="0.0.0"[exported]
    javax.lang.model; version="0.0.0"[exported]
    javax.lang.model.element; version="0.0.0"[exported]
    javax.lang.model.type; version="0.0.0"[exported]
    javax.lang.model.util; version="0.0.0"[exported]
    javax.management; version="0.0.0"[exported]
    javax.management.loading; version="0.0.0"[exported]
    javax.management.modelmbean; version="0.0.0"[exported]
    javax.management.monitor; version="0.0.0"[exported]
    javax.management.openmbean; version="0.0.0"[exported]
    javax.management.relation; version="0.0.0"[exported]
    javax.management.remote; version="0.0.0"[exported]
    javax.management.remote.rmi; version="0.0.0"[exported]
    javax.management.timer; version="0.0.0"[exported]
    javax.naming; version="0.0.0"[exported]
    javax.naming.directory; version="0.0.0"[exported]
    javax.naming.event; version="0.0.0"[exported]
    javax.naming.ldap; version="0.0.0"[exported]
    javax.naming.spi; version="0.0.0"[exported]
    javax.net; version="0.0.0"[exported]
    javax.net.ssl; version="0.0.0"[exported]
    javax.print; version="0.0.0"[exported]
    javax.print.attribute; version="0.0.0"[exported]
    javax.print.attribute.standard; version="0.0.0"[exported]
    javax.print.event; version="0.0.0"[exported]
    javax.rmi; version="0.0.0"[exported]
    javax.rmi.CORBA; version="0.0.0"[exported]
    javax.rmi.ssl; version="0.0.0"[exported]
    javax.script; version="0.0.0"[exported]
    javax.security.auth; version="0.0.0"[exported]
    javax.security.auth.callback; version="0.0.0"[exported]
    javax.security.auth.kerberos; version="0.0.0"[exported]
    javax.security.auth.login; version="0.0.0"[exported]
    javax.security.auth.spi; version="0.0.0"[exported]
    javax.security.auth.x500; version="0.0.0"[exported]
    javax.security.cert; version="0.0.0"[exported]
    javax.security.sasl; version="0.0.0"[exported]
    javax.sound.midi; version="0.0.0"[exported]
    javax.sound.midi.spi; version="0.0.0"[exported]
    javax.sound.sampled; version="0.0.0"[exported]
    javax.sound.sampled.spi; version="0.0.0"[exported]
    javax.sql; version="0.0.0"[exported]
    javax.sql.rowset; version="0.0.0"[exported]
    javax.sql.rowset.serial; version="0.0.0"[exported]
    javax.sql.rowset.spi; version="0.0.0"[exported]
    javax.swing; version="0.0.0"[exported]
    javax.swing.border; version="0.0.0"[exported]
    javax.swing.colorchooser; version="0.0.0"[exported]
    javax.swing.event; version="0.0.0"[exported]
    javax.swing.filechooser; version="0.0.0"[exported]
    javax.swing.plaf; version="0.0.0"[exported]
    javax.swing.plaf.basic; version="0.0.0"[exported]
    javax.swing.plaf.metal; version="0.0.0"[exported]
    javax.swing.plaf.multi; version="0.0.0"[exported]
    javax.swing.plaf.synth; version="0.0.0"[exported]
    javax.swing.table; version="0.0.0"[exported]
    javax.swing.text; version="0.0.0"[exported]
    javax.swing.text.html; version="0.0.0"[exported]
    javax.swing.text.html.parser; version="0.0.0"[exported]
    javax.swing.text.rtf; version="0.0.0"[exported]
    javax.swing.tree; version="0.0.0"[exported]
    javax.swing.undo; version="0.0.0"[exported]
    javax.tools; version="0.0.0"[exported]
    javax.transaction; version="0.0.0"[exported]
    javax.transaction.xa; version="0.0.0"[exported]
    javax.xml; version="0.0.0"[exported]
    javax.xml.bind; version="0.0.0"[exported]
    javax.xml.bind.annotation; version="0.0.0"[exported]
    javax.xml.bind.annotation.adapters; version="0.0.0"[exported]
    javax.xml.bind.attachment; version="0.0.0"[exported]
    javax.xml.bind.helpers; version="0.0.0"[exported]
    javax.xml.bind.util; version="0.0.0"[exported]
    javax.xml.crypto; version="0.0.0"[exported]
    javax.xml.crypto.dom; version="0.0.0"[exported]
    javax.xml.crypto.dsig; version="0.0.0"[exported]
    javax.xml.crypto.dsig.dom; version="0.0.0"[exported]
    javax.xml.crypto.dsig.keyinfo; version="0.0.0"[exported]
    javax.xml.crypto.dsig.spec; version="0.0.0"[exported]
    javax.xml.datatype; version="0.0.0"[exported]
    javax.xml.namespace; version="0.0.0"[exported]
    javax.xml.parsers; version="0.0.0"[exported]
    javax.xml.soap; version="0.0.0"[exported]
    javax.xml.stream; version="0.0.0"[exported]
    javax.xml.stream.events; version="0.0.0"[exported]
    javax.xml.stream.util; version="0.0.0"[exported]
    javax.xml.transform; version="0.0.0"[exported]
    javax.xml.transform.dom; version="0.0.0"[exported]
    javax.xml.transform.sax; version="0.0.0"[exported]
    javax.xml.transform.stax; version="0.0.0"[exported]
    javax.xml.transform.stream; version="0.0.0"[exported]
    javax.xml.validation; version="0.0.0"[exported]
    javax.xml.ws; version="0.0.0"[exported]
    javax.xml.ws.handler; version="0.0.0"[exported]
    javax.xml.ws.handler.soap; version="0.0.0"[exported]
    javax.xml.ws.http; version="0.0.0"[exported]
    javax.xml.ws.soap; version="0.0.0"[exported]
    javax.xml.ws.spi; version="0.0.0"[exported]
    javax.xml.ws.wsaddressing; version="0.0.0"[exported]
    javax.xml.xpath; version="0.0.0"[exported]
    org.ietf.jgss; version="0.0.0"[exported]
    org.omg.CORBA; version="0.0.0"[exported]
    org.omg.CORBA_2_3; version="0.0.0"[exported]
    org.omg.CORBA_2_3.portable; version="0.0.0"[exported]
    org.omg.CORBA.DynAnyPackage; version="0.0.0"[exported]
    org.omg.CORBA.ORBPackage; version="0.0.0"[exported]
    org.omg.CORBA.portable; version="0.0.0"[exported]
    org.omg.CORBA.TypeCodePackage; version="0.0.0"[exported]
    org.omg.CosNaming; version="0.0.0"[exported]
    org.omg.CosNaming.NamingContextExtPackage; version="0.0.0"[exported]
    org.omg.CosNaming.NamingContextPackage; version="0.0.0"[exported]
    org.omg.Dynamic; version="0.0.0"[exported]
    org.omg.DynamicAny; version="0.0.0"[exported]
    org.omg.DynamicAny.DynAnyFactoryPackage; version="0.0.0"[exported]
    org.omg.DynamicAny.DynAnyPackage; version="0.0.0"[exported]
    org.omg.IOP; version="0.0.0"[exported]
    org.omg.IOP.CodecFactoryPackage; version="0.0.0"[exported]
    org.omg.IOP.CodecPackage; version="0.0.0"[exported]
    org.omg.Messaging; version="0.0.0"[exported]
    org.omg.PortableInterceptor; version="0.0.0"[exported]
    org.omg.PortableInterceptor.ORBInitInfoPackage; version="0.0.0"[exported]
    org.omg.PortableServer; version="0.0.0"[exported]
    org.omg.PortableServer.CurrentPackage; version="0.0.0"[exported]
    org.omg.PortableServer.POAManagerPackage; version="0.0.0"[exported]
    org.omg.PortableServer.POAPackage; version="0.0.0"[exported]
    org.omg.PortableServer.portable; version="0.0.0"[exported]
    org.omg.PortableServer.ServantLocatorPackage; version="0.0.0"[exported]
    org.omg.SendingContext; version="0.0.0"[exported]
    org.omg.stub.java.rmi; version="0.0.0"[exported]
    org.w3c.dom; version="0.0.0"[exported]
    org.w3c.dom.bootstrap; version="0.0.0"[exported]
    org.w3c.dom.css; version="0.0.0"[exported]
    org.w3c.dom.events; version="0.0.0"[exported]
    org.w3c.dom.html; version="0.0.0"[exported]
    org.w3c.dom.ls; version="0.0.0"[exported]
    org.w3c.dom.ranges; version="0.0.0"[exported]
    org.w3c.dom.stylesheets; version="0.0.0"[exported]
    org.w3c.dom.traversal; version="0.0.0"[exported]
    org.w3c.dom.views; version="0.0.0"[exported]
    org.w3c.dom.xpath; version="0.0.0"[exported]
    org.xml.sax; version="0.0.0"[exported]
    org.xml.sax.ext; version="0.0.0"[exported]
    org.xml.sax.helpers; version="0.0.0"[exported]
  No imported packages
  No fragment bundles
  Named class space
    org.eclipse.osgi; bundle-version="3.6.2.R36x_v20110210"[provided]
  No required bundles

这里是堆栈跟踪:

Caused by: java.lang.NoClassDefFoundError: org/w3c/dom/Node
    at es.umu.mvia.imsclient.impl.protocol.sip.OperationSetPresenceSipImpl.<init>  (OperationSetPresenceSipImpl.java:150)
    at es.umu.mvia.imsclient.impl.protocol.sip.ProtocolProviderServiceSipImpl.initialize(ProtocolPr oviderServiceSipImpl.java:951)
    at es.umu.mvia.imsclient.impl.protocol.sip.ProtocolProviderFactorySipImpl.loadAccount(ProtocolProviderFactorySipImpl.java:222)
    at es.umu.mvia.imsclient.impl.protocol.sip.ProtocolProviderFactorySipImpl.installAccount(ProtocolProviderFactorySipImpl.java:159)
    at es.umu.mvia.imsclient.impl.protocol.sip.ProtocolSipDS.installAccount(ProtocolSipDS.java:103)
    at es.umu.mvia.imsclient.ims.configuration.impl.IMSConfigurationServiceImpl.newAccount(IMSConfigurationServiceImpl.java:170)
    at es.umu.mvia.imsclient.ims.configuration.IMSConfiguration.newAccount(IMSConfiguration.java:78 )
    at es.umu.imsclient.shuttle.IMSClientShuttle.activate(IMSClientShuttle.java:33)
    ... 54 more
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Node
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 62 more

My application launches a NoClassDefFoundError looking for the org.w3c.dom.Node class when it runs on standalone mode over Equinox.

Is this class provided by the framework? On the command line, I have run the command getprop and this class is listed in the org.osgi.framework.system.packages property.

I have checked the Import tag from the MANIFEST file and is ok.

Any ideas? What I'm doing wrong?

Here the MANIFEST:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Protocol-sip-ds
Bundle-SymbolicName: es.umu.imsclient.protocol-sip-ds
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Description: A bundle that implements the Protocol Provider package over SIP.
Import-Package: EDU.oswego.cs.dl.util.concurrent,
 es.umu.mvia.imsclient.configuration.event,
 es.umu.mvia.imsclient.configuration.service,
 es.umu.mvia.imsclient.netaddr.service,
 es.umu.mvia.imsclient.service.protocol,
 es.umu.mvia.imsclient.service.protocol.event,
 es.umu.mvia.imsclient.util,
 javax.net.ssl,
 javax.xml.transform,
 org.osgi.framework,
 org.osgi.service.component;version="1.1.0",
 org.osgi.service.event,
 org.osgi.util.tracker,
 org.w3c.dom
Bundle-Vendor: ims-osgi-client
Bundle-ClassPath: .,
 lib/JainSipRi1.2.jar,
 lib/JainSipApi1.2.jar,
 lib/log4j-1.2.15.jar
Service-Component: OSGI-INF/component.xml

The output of bundle [id]:

osgi> bundle 13
es.umu.imsclient.protocol-sip-ds_1.0.0.qualifier [13]
  Id=13, Status=ACTIVE      Data     Root=C:\Users\gsit\Desktop\oasis\configuration\org.eclipse.osgi\bundles\13\data
  Registered Services
    {es.umu.mvia.imsclient.service.protocol.ProtocolProviderFactory}=   {component.name=protocol-sip-ds, component.id=7, service.id=42}
  Services in use:
    {org.osgi.service.event.EventAdmin}={component.name=org.eclipse.equinox.event,    component.id=11, service.id=41}
    {es.umu.mvia.imsclient.configuration.service.ConfigurationService}=  {component.name=es.umu.mvia.imsclient.configuration, component.id=0, service.id=35}
    {es.umu.mvia.imsclient.netaddr.service.NetworkAddressManagerService}=   {component.name=es.umu.mvia.imsclient.netaddr, component.id=6, service.id=36}

  No exported packages
  Imported packages
    EDU.oswego.cs.dl.util.concurrent; version="0.0.0"<Concurrent_1.0.0 [16]>
    es.umu.mvia.imsclient.configuration.event; version="0.0.0"  <es.umu.imsclient.configuration_1.2.0 [5]>
    es.umu.mvia.imsclient.configuration.service; version="0.0.0"   <es.umu.imsclient.configuration_1.2.0 [5]>
    es.umu.mvia.imsclient.netaddr.service; version="0.0.0"   <es.umu.imsclient.netaddr_1.2.0 [11]>
    es.umu.mvia.imsclient.service.protocol; version="0.0.0"  <es.umu.imsclient.protocol_1.2.0 [12]>
    es.umu.mvia.imsclient.service.protocol.event; version="0.0.0"<es.umu.imsclient.protocol_1.2.0 [12]>
    es.umu.mvia.imsclient.util; version="0.0.0"<es.umu.imsclient.util_1.2.0 [14]>
    javax.net.ssl; version="0.0.0"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
    javax.xml.transform; version="0.0.0"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
    org.osgi.framework; version="1.5.0"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
    org.osgi.service.component; version="1.1.0"  <org.eclipse.osgi.services_3.2.100.v20100503 [28]>
    org.osgi.service.event; version="1.2.0"<org.eclipse.osgi.services_3.2.100.v20100503   [28]>
    org.osgi.util.tracker; version="1.4.2"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
    org.w3c.dom; version="0.0.0"<org.eclipse.osgi_3.6.2.R36x_v20110210 [0]>
  No fragment bundles
  Named class space
    es.umu.imsclient.protocol-sip-ds; bundle-version="1.0.0.qualifier"[provided]
  No required bundles

And the output of bundle 0 :

...
  Exported packages
    org.eclipse.osgi.event; version="1.0.0"[exported]
    org.eclipse.osgi.framework.console; version="1.1.0"[exported]
    org.eclipse.osgi.framework.eventmgr; version="1.2.0"[exported]
    org.eclipse.osgi.framework.log; version="1.0.0"[exported]
    org.eclipse.osgi.launch; version="1.0.0"[exported]
    org.eclipse.osgi.service.datalocation; version="1.3.0"[exported]
    org.eclipse.osgi.service.debug; version="1.2.0"[exported]
    org.eclipse.osgi.service.environment; version="1.3.0"[exported]
    org.eclipse.osgi.service.localization; version="1.1.0"[exported]
    org.eclipse.osgi.service.pluginconversion; version="1.0.0"[exported]
    org.eclipse.osgi.service.resolver; version="1.4.0"[exported]
    org.eclipse.osgi.service.runnable; version="1.1.0"[exported]
    org.eclipse.osgi.service.security; version="1.0.0"[exported]
    org.eclipse.osgi.service.urlconversion; version="1.0.0"[exported]
    org.eclipse.osgi.signedcontent; version="1.0.0"[exported]
    org.eclipse.osgi.storagemanager; version="1.0.0"[exported]
    org.eclipse.osgi.util; version="1.1.0"[exported]
    org.osgi.framework; version="1.5.0"[exported]
    org.osgi.framework.launch; version="1.0.0"[exported]
    org.osgi.framework.hooks.service; version="1.0.0"[exported]
    org.osgi.service.condpermadmin; version="1.1.0"[exported]
    org.osgi.service.framework; version="1.0.0"[exported]
    org.osgi.service.packageadmin; version="1.2.0"[exported]
    org.osgi.service.permissionadmin; version="1.2.0"[exported]
    org.osgi.service.startlevel; version="1.1.0"[exported]
    org.osgi.service.url; version="1.0.0"[exported]
    org.osgi.util.tracker; version="1.4.0"[exported]
    org.osgi.util.tracker; version="1.4.2"[exported]
    org.eclipse.core.runtime.adaptor; version="0.0.0"[exported]
    org.eclipse.core.runtime.internal.adaptor; version="0.0.0"[exported]
    org.eclipse.core.runtime.internal.stats; version="0.0.0"[exported]
    org.eclipse.osgi.baseadaptor; version="0.0.0"[exported]
    org.eclipse.osgi.baseadaptor.bundlefile; version="0.0.0"[exported]
    org.eclipse.osgi.baseadaptor.hooks; version="0.0.0"[exported]
    org.eclipse.osgi.baseadaptor.loader; version="0.0.0"[exported]
    org.eclipse.osgi.framework.adaptor; version="0.0.0"[exported]
    org.eclipse.osgi.framework.debug; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.core; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.protocol; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.protocol.bundleentry; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.protocol.bundleresource; version="0.0.0"    [exported]
    org.eclipse.osgi.framework.internal.protocol.reference; version="0.0.0"[exported]
    org.eclipse.osgi.framework.internal.reliablefile; version="0.0.0"[exported]
    org.eclipse.osgi.framework.util; version="0.0.0"[exported]
    org.eclipse.osgi.internal.baseadaptor; version="0.0.0"[exported]
    org.eclipse.osgi.internal.composite; version="0.0.0"[exported]
    org.eclipse.osgi.internal.loader; version="0.0.0"[exported]
    org.eclipse.osgi.internal.loader.buddy; version="0.0.0"[exported]
    org.eclipse.osgi.internal.module; version="0.0.0"[exported]
    org.eclipse.osgi.internal.profile; version="0.0.0"[exported]
    org.eclipse.osgi.internal.resolver; version="0.0.0"[exported]
    org.eclipse.osgi.internal.serviceregistry; version="0.0.0"[exported]
    org.eclipse.osgi.internal.permadmin; version="0.0.0"[exported]
    org.eclipse.osgi.internal.provisional.service.security; version="1.0.0"[exported]
    org.eclipse.osgi.internal.provisional.verifier; version="0.0.0"[exported]
    org.eclipse.osgi.internal.service.security; version="0.0.0"[exported]
    org.eclipse.osgi.internal.signedcontent; version="0.0.0"[exported]
    org.eclipse.osgi.service.internal.composite; version="0.0.0"[exported]
    javax.accessibility; version="0.0.0"[exported]
    javax.activation; version="0.0.0"[exported]
    javax.activity; version="0.0.0"[exported]
    javax.annotation; version="0.0.0"[exported]
    javax.annotation.processing; version="0.0.0"[exported]
    javax.crypto; version="0.0.0"[exported]
    javax.crypto.interfaces; version="0.0.0"[exported]
    javax.crypto.spec; version="0.0.0"[exported]
    javax.imageio; version="0.0.0"[exported]
    javax.imageio.event; version="0.0.0"[exported]
    javax.imageio.metadata; version="0.0.0"[exported]
    javax.imageio.plugins.bmp; version="0.0.0"[exported]
    javax.imageio.plugins.jpeg; version="0.0.0"[exported]
    javax.imageio.spi; version="0.0.0"[exported]
    javax.imageio.stream; version="0.0.0"[exported]
    javax.jws; version="0.0.0"[exported]
    javax.jws.soap; version="0.0.0"[exported]
    javax.lang.model; version="0.0.0"[exported]
    javax.lang.model.element; version="0.0.0"[exported]
    javax.lang.model.type; version="0.0.0"[exported]
    javax.lang.model.util; version="0.0.0"[exported]
    javax.management; version="0.0.0"[exported]
    javax.management.loading; version="0.0.0"[exported]
    javax.management.modelmbean; version="0.0.0"[exported]
    javax.management.monitor; version="0.0.0"[exported]
    javax.management.openmbean; version="0.0.0"[exported]
    javax.management.relation; version="0.0.0"[exported]
    javax.management.remote; version="0.0.0"[exported]
    javax.management.remote.rmi; version="0.0.0"[exported]
    javax.management.timer; version="0.0.0"[exported]
    javax.naming; version="0.0.0"[exported]
    javax.naming.directory; version="0.0.0"[exported]
    javax.naming.event; version="0.0.0"[exported]
    javax.naming.ldap; version="0.0.0"[exported]
    javax.naming.spi; version="0.0.0"[exported]
    javax.net; version="0.0.0"[exported]
    javax.net.ssl; version="0.0.0"[exported]
    javax.print; version="0.0.0"[exported]
    javax.print.attribute; version="0.0.0"[exported]
    javax.print.attribute.standard; version="0.0.0"[exported]
    javax.print.event; version="0.0.0"[exported]
    javax.rmi; version="0.0.0"[exported]
    javax.rmi.CORBA; version="0.0.0"[exported]
    javax.rmi.ssl; version="0.0.0"[exported]
    javax.script; version="0.0.0"[exported]
    javax.security.auth; version="0.0.0"[exported]
    javax.security.auth.callback; version="0.0.0"[exported]
    javax.security.auth.kerberos; version="0.0.0"[exported]
    javax.security.auth.login; version="0.0.0"[exported]
    javax.security.auth.spi; version="0.0.0"[exported]
    javax.security.auth.x500; version="0.0.0"[exported]
    javax.security.cert; version="0.0.0"[exported]
    javax.security.sasl; version="0.0.0"[exported]
    javax.sound.midi; version="0.0.0"[exported]
    javax.sound.midi.spi; version="0.0.0"[exported]
    javax.sound.sampled; version="0.0.0"[exported]
    javax.sound.sampled.spi; version="0.0.0"[exported]
    javax.sql; version="0.0.0"[exported]
    javax.sql.rowset; version="0.0.0"[exported]
    javax.sql.rowset.serial; version="0.0.0"[exported]
    javax.sql.rowset.spi; version="0.0.0"[exported]
    javax.swing; version="0.0.0"[exported]
    javax.swing.border; version="0.0.0"[exported]
    javax.swing.colorchooser; version="0.0.0"[exported]
    javax.swing.event; version="0.0.0"[exported]
    javax.swing.filechooser; version="0.0.0"[exported]
    javax.swing.plaf; version="0.0.0"[exported]
    javax.swing.plaf.basic; version="0.0.0"[exported]
    javax.swing.plaf.metal; version="0.0.0"[exported]
    javax.swing.plaf.multi; version="0.0.0"[exported]
    javax.swing.plaf.synth; version="0.0.0"[exported]
    javax.swing.table; version="0.0.0"[exported]
    javax.swing.text; version="0.0.0"[exported]
    javax.swing.text.html; version="0.0.0"[exported]
    javax.swing.text.html.parser; version="0.0.0"[exported]
    javax.swing.text.rtf; version="0.0.0"[exported]
    javax.swing.tree; version="0.0.0"[exported]
    javax.swing.undo; version="0.0.0"[exported]
    javax.tools; version="0.0.0"[exported]
    javax.transaction; version="0.0.0"[exported]
    javax.transaction.xa; version="0.0.0"[exported]
    javax.xml; version="0.0.0"[exported]
    javax.xml.bind; version="0.0.0"[exported]
    javax.xml.bind.annotation; version="0.0.0"[exported]
    javax.xml.bind.annotation.adapters; version="0.0.0"[exported]
    javax.xml.bind.attachment; version="0.0.0"[exported]
    javax.xml.bind.helpers; version="0.0.0"[exported]
    javax.xml.bind.util; version="0.0.0"[exported]
    javax.xml.crypto; version="0.0.0"[exported]
    javax.xml.crypto.dom; version="0.0.0"[exported]
    javax.xml.crypto.dsig; version="0.0.0"[exported]
    javax.xml.crypto.dsig.dom; version="0.0.0"[exported]
    javax.xml.crypto.dsig.keyinfo; version="0.0.0"[exported]
    javax.xml.crypto.dsig.spec; version="0.0.0"[exported]
    javax.xml.datatype; version="0.0.0"[exported]
    javax.xml.namespace; version="0.0.0"[exported]
    javax.xml.parsers; version="0.0.0"[exported]
    javax.xml.soap; version="0.0.0"[exported]
    javax.xml.stream; version="0.0.0"[exported]
    javax.xml.stream.events; version="0.0.0"[exported]
    javax.xml.stream.util; version="0.0.0"[exported]
    javax.xml.transform; version="0.0.0"[exported]
    javax.xml.transform.dom; version="0.0.0"[exported]
    javax.xml.transform.sax; version="0.0.0"[exported]
    javax.xml.transform.stax; version="0.0.0"[exported]
    javax.xml.transform.stream; version="0.0.0"[exported]
    javax.xml.validation; version="0.0.0"[exported]
    javax.xml.ws; version="0.0.0"[exported]
    javax.xml.ws.handler; version="0.0.0"[exported]
    javax.xml.ws.handler.soap; version="0.0.0"[exported]
    javax.xml.ws.http; version="0.0.0"[exported]
    javax.xml.ws.soap; version="0.0.0"[exported]
    javax.xml.ws.spi; version="0.0.0"[exported]
    javax.xml.ws.wsaddressing; version="0.0.0"[exported]
    javax.xml.xpath; version="0.0.0"[exported]
    org.ietf.jgss; version="0.0.0"[exported]
    org.omg.CORBA; version="0.0.0"[exported]
    org.omg.CORBA_2_3; version="0.0.0"[exported]
    org.omg.CORBA_2_3.portable; version="0.0.0"[exported]
    org.omg.CORBA.DynAnyPackage; version="0.0.0"[exported]
    org.omg.CORBA.ORBPackage; version="0.0.0"[exported]
    org.omg.CORBA.portable; version="0.0.0"[exported]
    org.omg.CORBA.TypeCodePackage; version="0.0.0"[exported]
    org.omg.CosNaming; version="0.0.0"[exported]
    org.omg.CosNaming.NamingContextExtPackage; version="0.0.0"[exported]
    org.omg.CosNaming.NamingContextPackage; version="0.0.0"[exported]
    org.omg.Dynamic; version="0.0.0"[exported]
    org.omg.DynamicAny; version="0.0.0"[exported]
    org.omg.DynamicAny.DynAnyFactoryPackage; version="0.0.0"[exported]
    org.omg.DynamicAny.DynAnyPackage; version="0.0.0"[exported]
    org.omg.IOP; version="0.0.0"[exported]
    org.omg.IOP.CodecFactoryPackage; version="0.0.0"[exported]
    org.omg.IOP.CodecPackage; version="0.0.0"[exported]
    org.omg.Messaging; version="0.0.0"[exported]
    org.omg.PortableInterceptor; version="0.0.0"[exported]
    org.omg.PortableInterceptor.ORBInitInfoPackage; version="0.0.0"[exported]
    org.omg.PortableServer; version="0.0.0"[exported]
    org.omg.PortableServer.CurrentPackage; version="0.0.0"[exported]
    org.omg.PortableServer.POAManagerPackage; version="0.0.0"[exported]
    org.omg.PortableServer.POAPackage; version="0.0.0"[exported]
    org.omg.PortableServer.portable; version="0.0.0"[exported]
    org.omg.PortableServer.ServantLocatorPackage; version="0.0.0"[exported]
    org.omg.SendingContext; version="0.0.0"[exported]
    org.omg.stub.java.rmi; version="0.0.0"[exported]
    org.w3c.dom; version="0.0.0"[exported]
    org.w3c.dom.bootstrap; version="0.0.0"[exported]
    org.w3c.dom.css; version="0.0.0"[exported]
    org.w3c.dom.events; version="0.0.0"[exported]
    org.w3c.dom.html; version="0.0.0"[exported]
    org.w3c.dom.ls; version="0.0.0"[exported]
    org.w3c.dom.ranges; version="0.0.0"[exported]
    org.w3c.dom.stylesheets; version="0.0.0"[exported]
    org.w3c.dom.traversal; version="0.0.0"[exported]
    org.w3c.dom.views; version="0.0.0"[exported]
    org.w3c.dom.xpath; version="0.0.0"[exported]
    org.xml.sax; version="0.0.0"[exported]
    org.xml.sax.ext; version="0.0.0"[exported]
    org.xml.sax.helpers; version="0.0.0"[exported]
  No imported packages
  No fragment bundles
  Named class space
    org.eclipse.osgi; bundle-version="3.6.2.R36x_v20110210"[provided]
  No required bundles

Here the stacktrace:

Caused by: java.lang.NoClassDefFoundError: org/w3c/dom/Node
    at es.umu.mvia.imsclient.impl.protocol.sip.OperationSetPresenceSipImpl.<init>  (OperationSetPresenceSipImpl.java:150)
    at es.umu.mvia.imsclient.impl.protocol.sip.ProtocolProviderServiceSipImpl.initialize(ProtocolPr oviderServiceSipImpl.java:951)
    at es.umu.mvia.imsclient.impl.protocol.sip.ProtocolProviderFactorySipImpl.loadAccount(ProtocolProviderFactorySipImpl.java:222)
    at es.umu.mvia.imsclient.impl.protocol.sip.ProtocolProviderFactorySipImpl.installAccount(ProtocolProviderFactorySipImpl.java:159)
    at es.umu.mvia.imsclient.impl.protocol.sip.ProtocolSipDS.installAccount(ProtocolSipDS.java:103)
    at es.umu.mvia.imsclient.ims.configuration.impl.IMSConfigurationServiceImpl.newAccount(IMSConfigurationServiceImpl.java:170)
    at es.umu.mvia.imsclient.ims.configuration.IMSConfiguration.newAccount(IMSConfiguration.java:78 )
    at es.umu.imsclient.shuttle.IMSClientShuttle.activate(IMSClientShuttle.java:33)
    ... 54 more
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Node
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 62 more

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

原来分手还会想你 2024-12-15 10:37:40

您是否也将 org.w3c.dom 导入到 Manifest 中?

Have you also imported org.w3c.dom into Manifest ?

醉殇 2024-12-15 10:37:40

在命令行上,我运行了命令 getprop ,这个类是
在 org.osgi.framework.system.packages 属性中列出。

您已将类的包(例如org.w3c.dom)而不是类(org.w3c.dom.Node)添加到org.osgi .framework.system.packagesorg.osgi.framework.system.packages.extra 属性。


另一个想法:在所有项目中搜索 org.w3c.dom.Node 用法,并检查使用此类的每个包是否在清单中导入其包。我猜您的 OperationSetPresenceSipImpl 使用了其他包中的类,该包也需要 org.w3c.dom.Node。也许第 3 方库也在其他包中使用 Node 类。

ClassNotFoundException 和 NoClassDefFoundError 之间有什么区别?

On the command line, I have run the command getprop and this class is
listed in the org.osgi.framework.system.packages property.

You have add the package of the class (e.g. org.w3c.dom) not the class (org.w3c.dom.Node) to the org.osgi.framework.system.packages or org.osgi.framework.system.packages.extra property.


An other idea: Search in all of your projects for org.w3c.dom.Node usages and check that every bundle which use this class imports its package in the manifest. I guess your OperationSetPresenceSipImpl use a class from an other bundle which also needs org.w3c.dom.Node. Maybe a 3rd party library also uses the Node class in an other bundle.

What is the difference between ClassNotFoundException and NoClassDefFoundError?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文