Community
Participate
Working Groups
I know there were a lot of opened issues regarding the problem of resolving javax.servlet. Some were closed and some are still open. Anyway, I faced this problem since Tycho 0.10.0 in several projects where I wanted to develop with the OSGi HTTPService (it needs javax.servlet). Today, after testing it with Tycho 0.12.0 and 0.13.0-SNAPSHOT I decided to open this bug. I'm also aware of Tycho Issue-602 [1] and I have to say that it was not fixed. I will attach an archive file that contains 4 artifacts. Two bundles, one feature and one "releng" project that contains the parent pom. The parent pom was executed with the goals clean verify. The releng project also contains a m2e launch configuration. Both, bundle1 and bundle2 are importing javax.servlet. One imports concret version and one a version range. The bundle2 also contains a bundle dependency to org.eclipse.rap.ui which implicit also needs javax.servlet. Steps to reproduce: 1) Import the 4 project from the attached archive in comment-1 2) Create a Target Platform in your IDE that uses the indigo repository to add the RAP Taget Components Feature in version 1.4.X. 3) Execute the Test.launch in the releng folder. Stacktrace: [ERROR] Internal error: java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle bundle2 cannot be resolved [ERROR] Resolution errors: [ERROR] Bundle bundle2 - Missing Constraint: Import-Package: javax.servlet; version="[2.3.0,3.0.0)" [ERROR] Bundle bundle2 - Missing Constraint: Import-Package: javax.servlet.http; version="[2.3.0,3.0.0)" [ERROR] -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle bundle2 cannot be resolved Resolution errors: Bundle bundle2 - Missing Constraint: Import-Package: javax.servlet; version="[2.3.0,3.0.0)" Bundle bundle2 - Missing Constraint: Import-Package: javax.servlet.http; version="[2.3.0,3.0.0)" at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle bundle2 cannot be resolved Resolution errors: Bundle bundle2 - Missing Constraint: Import-Package: javax.servlet; version="[2.3.0,3.0.0)" Bundle bundle2 - Missing Constraint: Import-Package: javax.servlet.http; version="[2.3.0,3.0.0)" at org.eclipse.tycho.core.osgitools.OsgiBundleProject.getResolverState(OsgiBundleProject.java:214) at org.eclipse.tycho.core.osgitools.OsgiBundleProject.resolveClassPath(OsgiBundleProject.java:154) at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:96) at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:91) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) ... 11 more Caused by: org.osgi.framework.BundleException: Bundle bundle2 cannot be resolved Resolution errors: Bundle bundle2 - Missing Constraint: Import-Package: javax.servlet; version="[2.3.0,3.0.0)" Bundle bundle2 - Missing Constraint: Import-Package: javax.servlet.http; version="[2.3.0,3.0.0)" at org.eclipse.tycho.core.osgitools.EquinoxResolver.assertResolved(EquinoxResolver.java:242) at org.eclipse.tycho.core.osgitools.EquinoxResolver.newResolvedState(EquinoxResolver.java:66) at org.eclipse.tycho.core.osgitools.OsgiBundleProject.getResolverState(OsgiBundleProject.java:212) ... 16 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException [1] https://issues.sonatype.org/browse/TYCHO-602
Created attachment 203050 [details] The attachment described in the bug description
*** This bug has been marked as a duplicate of bug 348045 ***