Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Missing Constraint: Import-Package: javax.servlet; version="2.6.0
Missing Constraint: Import-Package: javax.servlet; version="2.6.0 [message #1039551] Fri, 12 April 2013 09:32 Go to next message
Phill Perryman is currently offline Phill PerrymanFriend
Messages: 214
Registered: July 2009
Senior Member
I have got a simple application deploying to Tomcat (7.0.34) just fine. Now I want to use the HTTP Session to pass info between EntryPoints. After some investigation I find that if I take my working app and only add javax.servlet and javax.servlet.http to the required bundles in the manifest, and make no other changes to the app whatsoever and re-export the war file it fails with an error in the tomcat work directory. I did not touch the war file and it does not contain any javax bundles. I have used Imported and not required. I found several references but they all seem quite old. If I delete the imports and export and deploy the war again it all works.

!ENTRY test 4 0 2013-04-12 10:04:13.537
!MESSAGE FrameworkEvent ERROR
org.osgi.framework.BundleException: The bundle "test_1.0.0.201304121003 [19]" could not be resolved. Reason: Missing Constraint: Import-Package: javax.servlet; version="2.6.0"
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(
at org.eclipse.osgi.framework.eventmgr.EventManager$

!ENTRY org.eclipse.osgi 4 0 2013-04-12 10:04:13.540

<plugin id="org.apache.felix.gogo.command"/>
<plugin id="org.apache.felix.gogo.runtime"/>
<plugin id=""/>
<plugin id="org.eclipse.core.commands"/>
<plugin id="org.eclipse.equinox.common"/>
<plugin id="org.eclipse.equinox.console"/>
<plugin id="org.eclipse.equinox.ds"/>
<plugin id="org.eclipse.equinox.http.registry"/>
<plugin id="org.eclipse.equinox.http.servlet"/>
<plugin id="org.eclipse.equinox.http.servletbridge"/>
<plugin id="org.eclipse.equinox.registry"/>
<plugin id="org.eclipse.equinox.servletbridge"/>
<plugin id="org.eclipse.equinox.servletbridge.extensionbundle" fragment="true"/>
<plugin id="org.eclipse.equinox.util"/>
<plugin id="org.eclipse.osgi"/>
<plugin id=""/>
<plugin id="org.eclipse.rap.jface"/>
<plugin id="org.eclipse.rap.rwt"/>
<plugin id="org.eclipse.rap.rwt.osgi"/>
<plugin id="swb3.rwt.jars"/>
<plugin id="test"/>
Re: Missing Constraint: Import-Package: javax.servlet; version="2.6.0 [message #1041504 is a reply to message #1039551] Mon, 15 April 2013 07:23 Go to previous message
Phill Perryman is currently offline Phill PerrymanFriend
Messages: 214
Registered: July 2009
Senior Member
After trying lots of things it turned out to be the inclusion of version information in the imported package. Eclipse automatically put it in so I though nothing of it. When I remove the version info from the imported packages it deploys fine. Posting it here in case any one else runs into the same problem with versioning of imported packages.
Previous Topic:Cannot deploy to Tomcat 7
Next Topic:How to restore UISession?
Goto Forum:

Current Time: Sun Nov 28 00:06:17 GMT 2021

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

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

Back to the top