Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370306

Summary: java.lang.NoSuchFieldError: OPTIONAL
Product: z_Archived Reporter: Zeb Ford-Reitz <zeb.ford-reitz>
Component: TychoAssignee: Project Inbox <tycho-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: blocker    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Zeb Ford-Reitz CLA 2012-02-01 03:58:37 EST
I receive the above-mentioned error message while trying to build my Eclipse RCP application using the latest Tycho 0.14.0-SNAPSHOT. Stacktrace follows:

constituent[0]: file:/projects/jubula/Root/bin/apache-maven/lib/plexus-utils-2.0.4.jar
constituent[1]: file:/projects/jubula/Root/bin/apache-maven/lib/xercesMinimal-1.9.6.2.jar
constituent[2]: file:/projects/jubula/Root/bin/apache-maven/lib/nekohtml-1.9.6.2.jar
constituent[3]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-settings-3.0.2.jar
constituent[4]: file:/projects/jubula/Root/bin/apache-maven/lib/aether-api-1.9.jar
constituent[5]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-compat-3.0.2.jar
constituent[6]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-model-3.0.2.jar
constituent[7]: file:/projects/jubula/Root/bin/apache-maven/lib/plexus-interpolation-1.14.jar
constituent[8]: file:/projects/jubula/Root/bin/apache-maven/lib/sisu-inject-plexus-1.4.3.1.jar
constituent[9]: file:/projects/jubula/Root/bin/apache-maven/lib/plexus-cipher-1.4.jar
constituent[10]: file:/projects/jubula/Root/bin/apache-maven/lib/aether-util-1.9.jar
constituent[11]: file:/projects/jubula/Root/bin/apache-maven/lib/plexus-sec-dispatcher-1.3.jar
constituent[12]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-repository-metadata-3.0.2.jar
constituent[13]: file:/projects/jubula/Root/bin/apache-maven/lib/wagon-provider-api-1.0-beta-7.jar
constituent[14]: file:/projects/jubula/Root/bin/apache-maven/lib/plexus-component-annotations-1.5.5.jar
constituent[15]: file:/projects/jubula/Root/bin/apache-maven/lib/commons-cli-1.2.jar
constituent[16]: file:/projects/jubula/Root/bin/apache-maven/lib/wagon-http-shared-1.0-beta-7.jar
constituent[17]: file:/projects/jubula/Root/bin/apache-maven/lib/wagon-http-lightweight-1.0-beta-7.jar
constituent[18]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-plugin-api-3.0.2.jar
constituent[19]: file:/projects/jubula/Root/bin/apache-maven/lib/sisu-guice-2.9.1-noaop.jar
constituent[20]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-aether-provider-3.0.2.jar
constituent[21]: file:/projects/jubula/Root/bin/apache-maven/lib/aether-impl-1.9.jar
constituent[22]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-model-builder-3.0.2.jar
constituent[23]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-core-3.0.2.jar
constituent[24]: file:/projects/jubula/Root/bin/apache-maven/lib/wagon-file-1.0-beta-7.jar
constituent[25]: file:/projects/jubula/Root/bin/apache-maven/lib/aether-spi-1.9.jar
constituent[26]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-artifact-3.0.2.jar
constituent[27]: file:/projects/jubula/Root/bin/apache-maven/lib/sisu-inject-bean-1.4.3.1.jar
constituent[28]: file:/projects/jubula/Root/bin/apache-maven/lib/aether-connector-wagon-1.9.jar
constituent[29]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-settings-builder-3.0.2.jar
constituent[30]: file:/projects/jubula/Root/bin/apache-maven/lib/maven-embedder-3.0.2.jar
---------------------------------------------------
Exception in thread "main" java.lang.NoSuchFieldError: OPTIONAL
    at org.eclipse.tycho.p2.impl.publisher.BundleDependenciesAction.addRequireBundleRequirement(BundleDependenciesAction.java:73)
    at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.doCreateBundleIU(BundlesAction.java:185)
    at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.generateBundleIUs(BundlesAction.java:758)
    at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.perform(BundlesAction.java:670)
    at org.eclipse.equinox.p2.publisher.Publisher$ArtifactProcess.run(Publisher.java:207)
    at org.eclipse.equinox.p2.publisher.Publisher.publish(Publisher.java:237)
    at org.eclipse.tycho.p2.impl.publisher.AbstractMetadataGenerator.publish(AbstractMetadataGenerator.java:118)
    at org.eclipse.tycho.p2.impl.publisher.AbstractMetadataGenerator.generateMetadata(AbstractMetadataGenerator.java:58)
    at org.eclipse.tycho.p2.impl.publisher.DefaultDependencyMetadataGenerator.generateMetadata(DefaultDependencyMetadataGenerator.java:30)
    at org.eclipse.tycho.p2.impl.publisher.DefaultDependencyMetadataGenerator.generateMetadata(DefaultDependencyMetadataGenerator.java:1)
    at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.setupProjects(P2TargetPlatformResolver.java:141)
    at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.setupProject(DefaultTychoDependencyResolver.java:76)
    at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:56)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
    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)
Comment 1 Zeb Ford-Reitz CLA 2012-02-01 04:18:18 EST
Expiring the cache in our Nexus instance for https://oss.sonatype.org/content/groups/public and then forcing an update seems to have fixed the problem.

Sorry for the churn.