org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Require-Bundle: org.apache.commons.httpclient; bundle-version="0.0.0"

SpringSource Issue Tracker | Adrian Sampaleanu | 8 years ago
  1. 0

    With my Eclipse installation, some of the plugins depended on by com.springsource.server.ide.runtime.core did not install so this plugin would not resolve. The particulars of my Eclipse installation are as follows: eclipse_inst_dir dropins link file to external plugins location for WTP link file to external plugins location for SpringIDE+DM tools link file to external plugins location for Maven integration (m2e) link file to external plugins location for AJDT link file to external plugins location for miscellaneous smaller features I enabled debug in Eclipse to diagnose the problem and found the following (more comments at the end): ----------------------------------------------- !ENTRY org.eclipse.osgi 2 0 2009-03-30 10:52:01.768 !MESSAGE One or more bundles are not resolved because the following root constraints are not resolved: !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.768 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.core_1.1.3.M1.jar was not resolved. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.768 !MESSAGE Missing required bundle org.apache.commons.codec_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.768 !MESSAGE Missing required bundle org.apache.commons.httpclient_0.0.0. !ENTRY org.eclipse.osgi 2 0 2009-03-30 10:52:01.768 !MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists: !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.768 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.jdt.core_1.1.3.M1.jar [738] was not resolved. !SUBENTRY 2 com.springsource.server.ide.jdt.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.runtime.core_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.784 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.jdt.ui_1.1.3.M1.jar [739] was not resolved. !SUBENTRY 2 com.springsource.server.ide.jdt.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.runtime.core_0.0.0. !SUBENTRY 2 com.springsource.server.ide.jdt.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.jdt.core_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.784 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.core_1.1.3.M1.jar [743] was not resolved. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle org.apache.commons.codec_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle org.apache.commons.httpclient_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.hyades.trace.ui_[4.4.0,5.0.0). !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.tptp.platform.jvmti.client_[4.4.0,5.0.0). !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.tptp.platform.execution_[4.4.0,5.0.0). !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.tptp.platform.profile.server.core_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.tptp.platform.integration.pde_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.784 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.ui_1.1.3.M1.jar [744] was not resolved. !SUBENTRY 2 com.springsource.server.ide.runtime.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.ui_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.runtime.core_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.784 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.ui_1.1.3.M1.jar [745] was not resolved. !SUBENTRY 2 com.springsource.server.ide.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.runtime.core_0.0.0. !SUBENTRY 2 com.springsource.server.ide.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.jdt.core_0.0.0. Starting application: 34078 osgi> ss -s installed,resolved,active springsource.server Framework is launched. id State Bundle 734 RESOLVED com.springsource.server.ide.bundlor.ui_1.1.3.M1 737 ACTIVE com.springsource.server.ide.facet.core_1.1.3.M1 738 INSTALLED com.springsource.server.ide.jdt.core_1.1.3.M1 739 INSTALLED com.springsource.server.ide.jdt.ui_1.1.3.M1 740 ACTIVE com.springsource.server.ide.manifest.core_1.1.3.M1 743 INSTALLED com.springsource.server.ide.runtime.core_1.1.3.M1 744 INSTALLED com.springsource.server.ide.runtime.ui_1.1.3.M1 745 INSTALLED com.springsource.server.ide.ui_1.1.3.M1 osgi> diag 743 reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.core_1.1.3.M1.jar [743] Direct constraints which are unresolved: Missing required bundle org.apache.commons.codec_0.0.0. Missing required bundle org.apache.commons.httpclient_0.0.0. Missing optionally required bundle org.eclipse.hyades.trace.ui_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.jvmti.client_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.execution_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.profile.server.core_0.0.0. Missing optionally required bundle org.eclipse.tptp.platform.integration.pde_0.0.0. osgi> h 743 Bundle headers: Ant-Version = Apache Ant 1.7.0 Bundle-ActivationPolicy = lazy Bundle-Activator = com.springsource.server.ide.runtime.core.ServerCorePlugin Bundle-ClassPath = .,lib/com.springsource.brits.domain.jar Bundle-Localization = plugin Bundle-ManifestVersion = 2 Bundle-Name = SpringSource dm Server Eclipse Integration (Server Core) Bundle-RequiredExecutionEnvironment = J2SE-1.5 Bundle-SymbolicName = com.springsource.server.ide.runtime.core;singleton:=true Bundle-Vendor = SpringSource Bundle-Version = 1.1.3.M1 Created-By = 1.6.0_07-b06-57 (Apple Inc.) Eclipse-LazyStart = true Export-Package = com.springsource.brits.domain,com.springsource.server.ide.runtime.core,com.springsource.server.ide.runtime.core.provisioning,com.springsource.server.ide.runtime.i nternal.core,com.springsource.server.ide.runtime.internal.core.actions,com.springsource.server.ide.runtime.internal.core.command Manifest-Version = 1.0 Require-Bundle = org.eclipse.ui,org.eclipse.swt,org.eclipse.core.runtime,org.eclipse.wst.server.core,org.eclipse.jst.server.core,org.eclipse.jdt.launching,org.eclipse.core.resourc es,org.eclipse.debug.core,org.eclipse.jdt.core,org.eclipse.debug.ui,org.eclipse.jdt.debug.ui,org.eclipse.jst.common.project.facet.core,org.eclipse.wst.server.ui,org.eclipse.wst.com mon.project.facet.core,org.eclipse.wst.common.project.facet.ui,org.eclipse.wst.common.frameworks,org.eclipse.wst.common.core,org.eclipse.wst.common.modulecore,org.eclipse.equinox.l auncher,org.springframework.core,org.springframework.beans,org.springframework.ide.eclipse.core,org.springframework.ide.eclipse.beans.core,com.springsource.server.ide.facet.core,co m.springsource.server.ide.manifest.core,com.springsource.server.ide.par,com.sun.syndication,org.jdom,org.eclipse.core.net,com.springsource.org.apache.commons.logging;bundle-version ="[1.1.1,2.0.0)",org.apache.commons.codec,org.apache.commons.httpclient,org.eclipse.ui.console,org.eclipse.wst.xml.core,org.eclipse.wst.sse.core,org.eclipse.debug.ui;resolution:=op tional,org.eclipse.hyades.trace.ui;resolution:=optional;bundle-version="[4.4.0,5.0.0)",org.eclipse.tptp.platform.jvmti.client;resolution:=optional;bundle-version="[4.4.0,5.0.0)",or g.eclipse.tptp.platform.execution;resolution:=optional;bundle-version="[4.4.0,5.0.0)",org.eclipse.tptp.platform.profile.server.core;resolution:=optional,org.eclipse.tptp.platform.i ntegration.pde;resolution:=optional osgi> bundles -s installed,resolved httpclient osgi> install file:///C:/dev/eclipse-plugins-springide/eclipse/plugins/org.apache.commons.codec_1.3.0.v20080530-1600.jar Bundle id is 798 osgi> h 798 Bundle headers: Bundle-Localization = plugin Bundle-ManifestVersion = 2 Bundle-Name = Apache Commons Codec Plug-in Bundle-SymbolicName = org.apache.commons.codec Bundle-Vendor = Eclipse.org Bundle-Version = 1.3.0.v20080530-1600 Export-Package = org.apache.commons.codec;version="1.3.0",org.apache.commons.codec.binary;version="1.3.0",org.apache.commons.codec.digest;version="1.3.0",org.apache.commons.codec. language;version="1.3.0",org.apache.commons.codec.net;version="1.3.0" Manifest-Version = 1.0 osgi> diag 743 reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.core_1.1.3.M1.jar [743] Direct constraints which are unresolved: Missing required bundle org.apache.commons.codec_0.0.0. Missing required bundle org.apache.commons.httpclient_0.0.0. Missing optionally required bundle org.eclipse.hyades.trace.ui_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.jvmti.client_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.execution_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.profile.server.core_0.0.0. Missing optionally required bundle org.eclipse.tptp.platform.integration.pde_0.0.0. osgi> start 743 org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Require-Bundle: org.apache.commons.httpclient; bundle-version="0.0.0" at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257) at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:257) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150) at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302) at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:287) at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:223) at java.lang.Thread.run(Thread.java:619) osgi> install file:///C:/dev/eclipse-plugins-springide/eclipse/plugins/org.apache.commons.httpclient_3.1.0.v20080605-1935.jar Bundle id is 799 osgi> start 743 osgi> bundles -s installed,resolved httpclient file:///C:/dev/eclipse-plugins-springide/eclipse/plugins/org.apache.commons.httpclient_3.1.0.v20080605-1935.jar [799] Id=799, Status=RESOLVED Data Root=C:\dev\eclipse\configuration\org.eclipse.osgi\bundles\799\data No registered services. No services in use. osgi> ss -s installed,resolved,active springsource.server Framework is launched. id State Bundle 734 RESOLVED com.springsource.server.ide.bundlor.ui_1.1.3.M1 737 ACTIVE com.springsource.server.ide.facet.core_1.1.3.M1 738 ACTIVE com.springsource.server.ide.jdt.core_1.1.3.M1 739 ACTIVE com.springsource.server.ide.jdt.ui_1.1.3.M1 740 ACTIVE com.springsource.server.ide.manifest.core_1.1.3.M1 743 ACTIVE com.springsource.server.ide.runtime.core_1.1.3.M1 -------------------------------------------- What can be seen above is that the bundles org.apache.commons.codec and org.apache.commons.httpclient are not found by Eclipse for some reason even though they are referenced in the Required-Bundle header of com.springsource.server.ide.runtime.core. Installing these bundles manually from the console and then starting the runtime.core bundle did the trick. My guess is that the version on these bundles is causing a problem due to the version qualifier. I first tried putting the versions in the Required-Bundle header, but that still didn't fix the problem. I then added the packages exported by these bundles under Import-Packages as follows: Import-Package: org.apache.commons.httpclient;version="3.1.0",org.apac he.commons.httpclient.auth;version="3.1.0",org.apache.commons.httpcli ent.cookie;version="3.1.0",org.apache.commons.httpclient.methods;vers ion="3.1.0",org.apache.commons.httpclient.methods.multipart;version=" 3.1.0",org.apache.commons.httpclient.params;version="3.1.0",org.apach e.commons.httpclient.protocol;version="3.1.0",org.apache.commons.http client.util;version="3.1.0" Import-Package: org.apache.commons.codec;version="1.3.0",org.apache.co mmons.codec.binary;version="1.3.0",org.apache.commons.codec.digest;ve rsion="1.3.0",org.apache.commons.codec.language;version="1.3.0",org.a pache.commons.codec.net;version="1.3.0" It's curious that when I had the packages for commons.codec listed before those of httpclient, only the codec bundle installed, but the httpclient one still did not. In the order listed above, both bundles installed and the runtime.core plugin finally resolved (as well as the other plugins depending on it). Not sure what would happen if the two Import-Package headers were combined - I didn't try this due to the manual formatting it would've involved. I should mention that with a totally clean Eclipse I was able to have the DM tooling bundles resolve correctly. The problems I'm reporting here are under my regular installation. There are a couple of things I'd like to suggest that could minimize the number of problems that could come up in environments that already have a number of plugins installed. First, I would think about "harmonizing" the use of third party bundles between the Spring IDE/STS tooling and the DM server tooling. Currently, the org.apache.commons.codec package (version 1.3.0) is exported by two differently named bundles in this combined tooling. I'm not sure if this is true of any other bundles, but this can lead to problems if a required package and version is resolved from one bundle and another plugin has a required-Bundle dependency on the other bundle providing that package and version. Second, wouldn't it be good to move away from Required-Bundle altogether? From what I've read, Import-Package is the preferred header and using it, at least in my case, fixed the problems I was having.

    SpringSource Issue Tracker | 8 years ago | Adrian Sampaleanu
    org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Require-Bundle: org.apache.commons.httpclient; bundle-version="0.0.0"
  2. 0

    With my Eclipse installation, some of the plugins depended on by com.springsource.server.ide.runtime.core did not install so this plugin would not resolve. The particulars of my Eclipse installation are as follows: eclipse_inst_dir dropins link file to external plugins location for WTP link file to external plugins location for SpringIDE+DM tools link file to external plugins location for Maven integration (m2e) link file to external plugins location for AJDT link file to external plugins location for miscellaneous smaller features I enabled debug in Eclipse to diagnose the problem and found the following (more comments at the end): ----------------------------------------------- !ENTRY org.eclipse.osgi 2 0 2009-03-30 10:52:01.768 !MESSAGE One or more bundles are not resolved because the following root constraints are not resolved: !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.768 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.core_1.1.3.M1.jar was not resolved. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.768 !MESSAGE Missing required bundle org.apache.commons.codec_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.768 !MESSAGE Missing required bundle org.apache.commons.httpclient_0.0.0. !ENTRY org.eclipse.osgi 2 0 2009-03-30 10:52:01.768 !MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists: !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.768 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.jdt.core_1.1.3.M1.jar [738] was not resolved. !SUBENTRY 2 com.springsource.server.ide.jdt.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.runtime.core_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.784 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.jdt.ui_1.1.3.M1.jar [739] was not resolved. !SUBENTRY 2 com.springsource.server.ide.jdt.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.runtime.core_0.0.0. !SUBENTRY 2 com.springsource.server.ide.jdt.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.jdt.core_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.784 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.core_1.1.3.M1.jar [743] was not resolved. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle org.apache.commons.codec_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle org.apache.commons.httpclient_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.hyades.trace.ui_[4.4.0,5.0.0). !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.tptp.platform.jvmti.client_[4.4.0,5.0.0). !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.tptp.platform.execution_[4.4.0,5.0.0). !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.tptp.platform.profile.server.core_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.core 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing optionally required bundle org.eclipse.tptp.platform.integration.pde_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.784 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.ui_1.1.3.M1.jar [744] was not resolved. !SUBENTRY 2 com.springsource.server.ide.runtime.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.ui_0.0.0. !SUBENTRY 2 com.springsource.server.ide.runtime.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.runtime.core_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2009-03-30 10:52:01.784 !MESSAGE Bundle reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.ui_1.1.3.M1.jar [745] was not resolved. !SUBENTRY 2 com.springsource.server.ide.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.runtime.core_0.0.0. !SUBENTRY 2 com.springsource.server.ide.ui 2 0 2009-03-30 10:52:01.784 !MESSAGE Missing required bundle com.springsource.server.ide.jdt.core_0.0.0. Starting application: 34078 osgi> ss -s installed,resolved,active springsource.server Framework is launched. id State Bundle 734 RESOLVED com.springsource.server.ide.bundlor.ui_1.1.3.M1 737 ACTIVE com.springsource.server.ide.facet.core_1.1.3.M1 738 INSTALLED com.springsource.server.ide.jdt.core_1.1.3.M1 739 INSTALLED com.springsource.server.ide.jdt.ui_1.1.3.M1 740 ACTIVE com.springsource.server.ide.manifest.core_1.1.3.M1 743 INSTALLED com.springsource.server.ide.runtime.core_1.1.3.M1 744 INSTALLED com.springsource.server.ide.runtime.ui_1.1.3.M1 745 INSTALLED com.springsource.server.ide.ui_1.1.3.M1 osgi> diag 743 reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.core_1.1.3.M1.jar [743] Direct constraints which are unresolved: Missing required bundle org.apache.commons.codec_0.0.0. Missing required bundle org.apache.commons.httpclient_0.0.0. Missing optionally required bundle org.eclipse.hyades.trace.ui_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.jvmti.client_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.execution_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.profile.server.core_0.0.0. Missing optionally required bundle org.eclipse.tptp.platform.integration.pde_0.0.0. osgi> h 743 Bundle headers: Ant-Version = Apache Ant 1.7.0 Bundle-ActivationPolicy = lazy Bundle-Activator = com.springsource.server.ide.runtime.core.ServerCorePlugin Bundle-ClassPath = .,lib/com.springsource.brits.domain.jar Bundle-Localization = plugin Bundle-ManifestVersion = 2 Bundle-Name = SpringSource dm Server Eclipse Integration (Server Core) Bundle-RequiredExecutionEnvironment = J2SE-1.5 Bundle-SymbolicName = com.springsource.server.ide.runtime.core;singleton:=true Bundle-Vendor = SpringSource Bundle-Version = 1.1.3.M1 Created-By = 1.6.0_07-b06-57 (Apple Inc.) Eclipse-LazyStart = true Export-Package = com.springsource.brits.domain,com.springsource.server.ide.runtime.core,com.springsource.server.ide.runtime.core.provisioning,com.springsource.server.ide.runtime.i nternal.core,com.springsource.server.ide.runtime.internal.core.actions,com.springsource.server.ide.runtime.internal.core.command Manifest-Version = 1.0 Require-Bundle = org.eclipse.ui,org.eclipse.swt,org.eclipse.core.runtime,org.eclipse.wst.server.core,org.eclipse.jst.server.core,org.eclipse.jdt.launching,org.eclipse.core.resourc es,org.eclipse.debug.core,org.eclipse.jdt.core,org.eclipse.debug.ui,org.eclipse.jdt.debug.ui,org.eclipse.jst.common.project.facet.core,org.eclipse.wst.server.ui,org.eclipse.wst.com mon.project.facet.core,org.eclipse.wst.common.project.facet.ui,org.eclipse.wst.common.frameworks,org.eclipse.wst.common.core,org.eclipse.wst.common.modulecore,org.eclipse.equinox.l auncher,org.springframework.core,org.springframework.beans,org.springframework.ide.eclipse.core,org.springframework.ide.eclipse.beans.core,com.springsource.server.ide.facet.core,co m.springsource.server.ide.manifest.core,com.springsource.server.ide.par,com.sun.syndication,org.jdom,org.eclipse.core.net,com.springsource.org.apache.commons.logging;bundle-version ="[1.1.1,2.0.0)",org.apache.commons.codec,org.apache.commons.httpclient,org.eclipse.ui.console,org.eclipse.wst.xml.core,org.eclipse.wst.sse.core,org.eclipse.debug.ui;resolution:=op tional,org.eclipse.hyades.trace.ui;resolution:=optional;bundle-version="[4.4.0,5.0.0)",org.eclipse.tptp.platform.jvmti.client;resolution:=optional;bundle-version="[4.4.0,5.0.0)",or g.eclipse.tptp.platform.execution;resolution:=optional;bundle-version="[4.4.0,5.0.0)",org.eclipse.tptp.platform.profile.server.core;resolution:=optional,org.eclipse.tptp.platform.i ntegration.pde;resolution:=optional osgi> bundles -s installed,resolved httpclient osgi> install file:///C:/dev/eclipse-plugins-springide/eclipse/plugins/org.apache.commons.codec_1.3.0.v20080530-1600.jar Bundle id is 798 osgi> h 798 Bundle headers: Bundle-Localization = plugin Bundle-ManifestVersion = 2 Bundle-Name = Apache Commons Codec Plug-in Bundle-SymbolicName = org.apache.commons.codec Bundle-Vendor = Eclipse.org Bundle-Version = 1.3.0.v20080530-1600 Export-Package = org.apache.commons.codec;version="1.3.0",org.apache.commons.codec.binary;version="1.3.0",org.apache.commons.codec.digest;version="1.3.0",org.apache.commons.codec. language;version="1.3.0",org.apache.commons.codec.net;version="1.3.0" Manifest-Version = 1.0 osgi> diag 743 reference:file:../eclipse-plugins-springide\eclipse\plugins\com.springsource.server.ide.runtime.core_1.1.3.M1.jar [743] Direct constraints which are unresolved: Missing required bundle org.apache.commons.codec_0.0.0. Missing required bundle org.apache.commons.httpclient_0.0.0. Missing optionally required bundle org.eclipse.hyades.trace.ui_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.jvmti.client_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.execution_[4.4.0,5.0.0). Missing optionally required bundle org.eclipse.tptp.platform.profile.server.core_0.0.0. Missing optionally required bundle org.eclipse.tptp.platform.integration.pde_0.0.0. osgi> start 743 org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Require-Bundle: org.apache.commons.httpclient; bundle-version="0.0.0" at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257) at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:257) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150) at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302) at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:287) at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:223) at java.lang.Thread.run(Thread.java:619) osgi> install file:///C:/dev/eclipse-plugins-springide/eclipse/plugins/org.apache.commons.httpclient_3.1.0.v20080605-1935.jar Bundle id is 799 osgi> start 743 osgi> bundles -s installed,resolved httpclient file:///C:/dev/eclipse-plugins-springide/eclipse/plugins/org.apache.commons.httpclient_3.1.0.v20080605-1935.jar [799] Id=799, Status=RESOLVED Data Root=C:\dev\eclipse\configuration\org.eclipse.osgi\bundles\799\data No registered services. No services in use. osgi> ss -s installed,resolved,active springsource.server Framework is launched. id State Bundle 734 RESOLVED com.springsource.server.ide.bundlor.ui_1.1.3.M1 737 ACTIVE com.springsource.server.ide.facet.core_1.1.3.M1 738 ACTIVE com.springsource.server.ide.jdt.core_1.1.3.M1 739 ACTIVE com.springsource.server.ide.jdt.ui_1.1.3.M1 740 ACTIVE com.springsource.server.ide.manifest.core_1.1.3.M1 743 ACTIVE com.springsource.server.ide.runtime.core_1.1.3.M1 -------------------------------------------- What can be seen above is that the bundles org.apache.commons.codec and org.apache.commons.httpclient are not found by Eclipse for some reason even though they are referenced in the Required-Bundle header of com.springsource.server.ide.runtime.core. Installing these bundles manually from the console and then starting the runtime.core bundle did the trick. My guess is that the version on these bundles is causing a problem due to the version qualifier. I first tried putting the versions in the Required-Bundle header, but that still didn't fix the problem. I then added the packages exported by these bundles under Import-Packages as follows: Import-Package: org.apache.commons.httpclient;version="3.1.0",org.apac he.commons.httpclient.auth;version="3.1.0",org.apache.commons.httpcli ent.cookie;version="3.1.0",org.apache.commons.httpclient.methods;vers ion="3.1.0",org.apache.commons.httpclient.methods.multipart;version=" 3.1.0",org.apache.commons.httpclient.params;version="3.1.0",org.apach e.commons.httpclient.protocol;version="3.1.0",org.apache.commons.http client.util;version="3.1.0" Import-Package: org.apache.commons.codec;version="1.3.0",org.apache.co mmons.codec.binary;version="1.3.0",org.apache.commons.codec.digest;ve rsion="1.3.0",org.apache.commons.codec.language;version="1.3.0",org.a pache.commons.codec.net;version="1.3.0" It's curious that when I had the packages for commons.codec listed before those of httpclient, only the codec bundle installed, but the httpclient one still did not. In the order listed above, both bundles installed and the runtime.core plugin finally resolved (as well as the other plugins depending on it). Not sure what would happen if the two Import-Package headers were combined - I didn't try this due to the manual formatting it would've involved. I should mention that with a totally clean Eclipse I was able to have the DM tooling bundles resolve correctly. The problems I'm reporting here are under my regular installation. There are a couple of things I'd like to suggest that could minimize the number of problems that could come up in environments that already have a number of plugins installed. First, I would think about "harmonizing" the use of third party bundles between the Spring IDE/STS tooling and the DM server tooling. Currently, the org.apache.commons.codec package (version 1.3.0) is exported by two differently named bundles in this combined tooling. I'm not sure if this is true of any other bundles, but this can lead to problems if a required package and version is resolved from one bundle and another plugin has a required-Bundle dependency on the other bundle providing that package and version. Second, wouldn't it be good to move away from Required-Bundle altogether? From what I've read, Import-Package is the preferred header and using it, at least in my case, fixed the problems I was having.

    SpringSource Issue Tracker | 8 years ago | Adrian Sampaleanu
    org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Require-Bundle: org.apache.commons.httpclient; bundle-version="0.0.0"
  3. 0

    Using slf4j with jdk1.4

    Google Groups | 9 years ago | amacg
    org.osgi.framework.BundleException: The activator org.springframework.osgi.extender.internal.ContextLoaderListener for bundle org.springframework.osgi.bundle.extender is invalid
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring 2.5 + OSGi, stuck at apache-commons, Help!

    Google Groups | 9 years ago | Hendy Irawan
    org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.commons.logging; version="0.0.0"
  6. 0

    Spring and OSGi Classloader issue... java.lang.ClassCastException: help :)

    Google Groups | 9 years ago | Hendy Irawan
    org.osgi.framework.BundleException: Exception in com.x.client.swing.App.start() of bundle com.x.client.swing.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.osgi.framework.BundleException

      The bundle could not be resolved. Reason: Missing Constraint: Require-Bundle: org.apache.commons.httpclient; bundle-version="0.0.0"

      at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker()
    2. Eclipse OSGi
      FrameworkCommandProvider._start
      1. org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
      2. org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
      3. org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
      4. org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:257)
      4 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. Eclipse OSGi
      FrameworkConsole.run
      1. org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150)
      2. org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
      3. org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
      4. org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:223)
      4 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame