Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Failure while executing "mvn install package -DskipTests -Pbuild-shaded-jar" #3459

Closed
nilesh-kanawade opened this issue Nov 12, 2018 · 6 comments

Comments

@nilesh-kanawade
Copy link

I was checking out pinot and was trying to install it locally in my machine. During "mvn install package -DskipTests -Pbuild-shaded-jar" I received compilation error in PinotBuffer class (pinot-core). I tried searching if anybody encounter this issue before but nobody did. :(

Here is the versions of tools I'm using:
Java : openjdk version "11.0.1" 2018-10-16
Maven : Apache Maven 3.6.0

Below is the snippet of error in debug mode:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project pinot-core: Compilation failure: Compilation failure:
[ERROR] /Users/nilesh/Documents/repositories/pinot/incubator-pinot/pinot-core/src/main/java/com/linkedin/pinot/core/segment/memory/PinotByteBuffer.java:[27,17] DirectBuffer is internal proprietary API and may be removed in a future release
[ERROR] /Users/nilesh/Documents/repositories/pinot/incubator-pinot/pinot-core/src/main/java/com/linkedin/pinot/core/segment/memory/PinotByteBuffer.java:[26,15] error: cannot find symbol
[ERROR] symbol: class Cleaner
[ERROR] location: package sun.misc
[ERROR] /Users/nilesh/Documents/repositories/pinot/incubator-pinot/pinot-core/src/main/java/com/linkedin/pinot/core/segment/memory/PinotByteBuffer.java:[27,17] DirectBuffer is internal proprietary API and may be removed in a future release
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project pinot-core: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:729)
at org.apache.maven.plugin.CompilerMojo.execute (CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :pinot-core

@nilesh-kanawade
Copy link
Author

I peeked into the code and found issue in these line:
import sun.misc.Cleaner; -> cannot find Cleaner class
import sun.nio.ch.DirectBuffer; -> internal API

anybody knows how to solve this??

@snleee
Copy link
Contributor

snleee commented Nov 12, 2018

@nilesh-kanawade Can you retry with JDK 8? It seems that sun.* are removed since JDK 9. I have found some similar issue from the other project bitcoinj/bitcoinj#1477

@nilesh-kanawade
Copy link
Author

Thanks @snleee!!

I have tried with java8 and got below error:
[ERROR] Failed to execute goal on project pinot-server: Could not resolve dependencies for project com.linkedin.pinot:pinot-server:jar:0.016: Failed to collect dependencies at com.jcabi:jcabi-log:jar:0.17.1: Failed to read artifact descriptor for com.jcabi:jcabi-log:jar:0.17.1: Could not transfer artifact com.jcabi:jcabi-log:pom:0.17.1 from/to chibi (http://www.chibi.ubc.ca/maven2/): www.chibi.ubc.ca: nodename nor servname provided, or not known: Unknown host www.chibi.ubc.ca: nodename nor servname provided, or not known -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :pinot-server

So, I changed command to "mvn -Pbuild-shaded-jar install package" which resolves above issue but eventually failed integration test (pinot-integration-test). Here is the output:
Results :
Failed tests:
OfflineClusterIntegrationTest.setUp:129->ClusterTest.uploadSegments:271 » Execution

Tests run: 81, Failures: 1, Errors: 0, Skipped: 5

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for pinot 0.016:
[INFO]
[INFO] pinot .............................................. SUCCESS [ 3.534 s]
[INFO] pinot-filesystem ................................... SUCCESS [ 14.043 s]
[INFO] pinot-common ....................................... SUCCESS [ 35.859 s]
[INFO] pinot-transport .................................... SUCCESS [01:15 min]
[INFO] pinot-core ......................................... SUCCESS [13:36 min]
[INFO] pinot-server ....................................... SUCCESS [04:08 min]
[INFO] pinot-controller ................................... SUCCESS [05:51 min]
[INFO] pinot-broker ....................................... SUCCESS [02:36 min]
[INFO] pinot-api .......................................... SUCCESS [ 13.576 s]
[INFO] pinot-hadoop ....................................... SUCCESS [ 49.484 s]
[INFO] pinot-tools ........................................ SUCCESS [01:32 min]
[INFO] pinot-minion ....................................... SUCCESS [ 18.665 s]
[INFO] pinot-integration-tests ............................ FAILURE [29:34 min]
[INFO] pinot-perf ......................................... SKIPPED
[INFO] pinot-hadoop-filesystem ............................ SKIPPED
[INFO] pinot-azure-filesystem ............................. SKIPPED
[INFO] pinot-distribution ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:00 h
[INFO] Finished at: 2018-11-12T14:54:56+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test) on project pinot-integration-tests: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/nilesh/Documents/repositories/pinot/incubator-pinot/pinot-integration-tests/target/surefire-reports for the individual test results.
[ERROR] -> [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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :pinot-integration-tests

@nilesh-kanawade
Copy link
Author

Just a headsup, I'm trying to build it in my local (MacBook Pro) which might be the issue.

@sunny19930321
Copy link
Contributor

mvn license:format
mvn clean install -DskipTests -Pbuild-shaded-jar

@nilesh-kanawade
Copy link
Author

Thanks @ly923976094, It worked!

Here is the sequence:
mvn license:format
mvn clean install -DskipTests -Pbuild-shaded-jar
mvn install package -DskipTests

It will generate necessary packages as suggested in document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants