ga4gh / gastore

Sample code to inform a discussion around content-addressable storage
Apache License 2.0
5 stars 3 forks source link

Error when trying mvn package #2

Open pgrosu opened 9 years ago

pgrosu commented 9 years ago

Hi Matt,

Thank you for putting this together! I got the following error when trying mvn package:

[ERROR] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[ERROR]
[ERROR]
[ERROR] An annotation processor threw an uncaught exception.
[ERROR] Consult the following stack trace for details.
[ERROR] java.lang.NoClassDefFoundError: com/sun/tools/javac/main/OptionName
[ERROR]         at com.google.java.contract.core.apt.AnnotationProcessor.setupPaths(AnnotationProcessor.java:225)
[ERROR]         at com.google.java.contract.core.apt.AnnotationProcessor.init(AnnotationProcessor.java:148)
[ERROR]         at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:500)
[ERROR]         at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:597)
[ERROR]         at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:690)
[ERROR]         at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
[ERROR]         at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
[ERROR]         at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
[ERROR]         at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1173)
[ERROR]         at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:859)
[ERROR]         at com.sun.tools.javac.main.Main.compile(Main.java:523)
[ERROR]         at com.sun.tools.javac.main.Main.compile(Main.java:381)
[ERROR]         at com.sun.tools.javac.main.Main.compile(Main.java:370)
[ERROR]         at com.sun.tools.javac.main.Main.compile(Main.java:361)
[ERROR]         at com.sun.tools.javac.Main.compile(Main.java:56)
[ERROR]         at com.sun.tools.javac.Main.main(Main.java:42)
[ERROR] Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.main.OptionName
[ERROR]         at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
[ERROR]         at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
[ERROR]         at java.security.AccessController.doPrivileged(Native Method)
[ERROR]         at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
[ERROR]         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[ERROR]         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[ERROR]         ... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.861 s
[INFO] Finished at: 2014-11-04T13:42:54-05:00
[INFO] Final Memory: 18M/191M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.1.5:compile (scala-compile-first) on project gastore: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.1.5:compile failed. CompileFailed -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/PluginExecutionException
$

Any advice would be greatly appreciated.

Thank you, Paul

massie commented 9 years ago

What is the output of mvm --version?

I have the following on my laptop

$ mvn --version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 08:22:22-0700)
Maven home: /workspace/pkgs/apache-maven-3.1.1
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"

I'm guessing that you're using Java 8 and there's an incompatibility. If you set JAVA_HOME to 1.7, you will likely see the problem disappear.

pgrosu commented 9 years ago

You are right that I use Java 8. I'll try to get Java 7. Below is the information regarding the mvn version:

$ mvn --version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T12:37:52-05:00)
Maven home: /home/pgrosu/apps/apache-maven-3.2.1
Java version: 1.8.0_05, vendor: Oracle Corporation
Java home: /home/pgrosu/apps/jdk1.8.0_05_64bit/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-358.el6.x86_64", arch: "amd64", family: "unix"
$
pgrosu commented 9 years ago

Yup, I replaced it with Java 7 and it works - thanks Matt :)

...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:01 min
[INFO] Finished at: 2014-11-04T14:20:48-05:00
[INFO] Final Memory: 62M/874M
[INFO] ------------------------------------------------------------------------
$