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
!STACK 0
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(AbstractBundle.java:1332)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

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

<plugins>
<plugin id="org.apache.felix.gogo.command"/>
<plugin id="org.apache.felix.gogo.runtime"/>
<plugin id="org.apache.felix.gogo.shell"/>
<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="org.eclipse.osgi.services"/>
<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"/>
</plugins>
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: Tue Apr 23 15:52:09 GMT 2024

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

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

Back to the top