Closed al3xandru closed 6 years ago
Hi Alex, thanks for reporting that!
> Task :opencensus-api:compileJava FAILED warning: [options] bootstrap class path not set in conjunction with -source 1.6 warning: [options] source value 1.6 is obsolete and will be removed in a future release warning: [options] target value 1.6 is obsolete and will be removed in a future release warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. error: warnings found and -Werror specified
It seems that the compiler issued some warnings. @al3xandru since I currently don't have a java 9 environment, would you please help paste the whole output so we can examine what went wrong?
@HailongWen I'll rerun it and see if there's anything useful in the output. At first thought, I don't remember seeing anything useful (no warnings or anything to give us a hint to where to start looking).
I think the error is due to source
and target
set to 1.6, combined with -Werror.
I tried building with Java 9 on Travis, and I got the same warnings. However, it passed when I removed -Werror and fixed some Error Prone warnings.
branch: https://github.com/sebright/opencensus-java/tree/oraclejdk9 build: https://travis-ci.org/sebright/opencensus-java/jobs/344666042
compiler warnings: https://travis-ci.org/sebright/opencensus-java/jobs/344666042#L597-L602
We should fix these warnings and then add Java 9 to CI.
I also saw an "illegal reflective access" warning from Mockito: https://travis-ci.org/sebright/opencensus-java/jobs/344666042#L1597-L1601
:opencensus-api:testWARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.mockito.cglib.core.ReflectUtils$2 (file:/home/travis/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/1.9.5/c3264abeea62c4d2f367e21484fbb40c7e256393/mockito-core-1.9.5.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.mockito.cglib.core.ReflectUtils$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Great start @sebright! Let me know if I can test anything locally.
Any ideas what the warning https://travis-ci.org/sebright/opencensus-java/jobs/344666042#L600 means:
An exception occurred while looking for AutoValue extensions. No extensions will function. This may be due to a corrupt jar file in the compiler's classpath. Exception: java.util.ServiceConfigurationError: com.google.auto.value.extension.AutoValueExtension: Provider com.google.auto.value.extension.memoized.MemoizeExtension could not be instantiated
@sebright good catch! Thanks! I think OpenCensus haven't officially supported Java 9 and we should do that.
Somehow I can't access travis to see the details of those warnings, but I did notice that AutoValue lower than 1.5.3 might have an issue with nullness check (https://github.com/google/auto/issues/546). I wonder if upgrading it might help.
Thanks. I tried upgrading to AutoValue 1.5.3. That fixed the warning with Java 9, but it failed with Java 7:
https://travis-ci.org/sebright/opencensus-java/builds/344955952
The error message is here: https://gist.github.com/sebright/414c04e1fb7ab072f1cf92628298efbf#file-autovalue-1-5-3-error-with-java-7
I turned off -Werror with Java 9 in #1016, so the build should succeed now.
I remember about the problem with the upgrade. The answer from auto-value was to generate files using java > 7 but the generated files will be java 6 (or 7 don't remembered exactly) compatible.
Here is the link: https://github.com/google/auto/issues/449
This issue should be fixed now that we are building with Java 9 in CI (#1016). I opened a separate issue for the warning caused by AutoValue: #1017
Please answer these questions before submitting a bug report.
What version of OpenCensus are you using?
This is against master ca3e76f3
What JVM are you using (
java -version
)?What did you do?
If possible, provide a recipe for reproducing the error.
./gradlew build
What did you expect to see?
successful build :-)
What did you see instead?