[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (FLINK-9445) fails on macOS when Java 9 & 10 are installed

Andrew Janke created FLINK-9445:

             Summary: fails on macOS when Java 9 & 10 are installed
                 Key: FLINK-9445
             Project: Flink
          Issue Type: Bug
    Affects Versions: 1.5.0
         Environment: macOS High Sierra 10.13.4

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.4
BuildVersion: 17E202


I have multiple JDKs installed:

$ ls /Library/Java/JavaVirtualMachines
jdk-10.0.1.jdk jdk-9.0.4.jdk jdk1.7.0_79.jdk jdk1.8.0_141.jdk

            Reporter: Andrew Janke

I'm attempting to install and test apache-flink 1.5.0 on macOS using Homebrew.

The test step runs flink's `` to exercise the package. When I do this, it issues some warnings about log4j and reflective access, and then hangs.

$ brew test apache-flink
 Testing apache-flink
 ==> /usr/local/Cellar/apache-flink/1.5.0/libexec/bin/ local
 Picked up _JAVA_OPTIONS: -Duser.home=/Users/janke/Library/Caches/Homebrew/java_cache
 log4j:WARN No appenders could be found for logger (org.apache.flink.configuration.GlobalConfiguration).
 log4j:WARN Please initialize the log4j system properly.
 log4j:WARN See [] for more info.
 WARNING: An illegal reflective access operation has occurred
 WARNING: Illegal reflective access by org.apache.flink.core.memory.HybridMemorySegment ([file:/usr/local/Cellar/apache-flink/1.5.0/libexec/lib/flink-dist_2.11-1.5.0.jar|file:///usr/local/Cellar/apache-flink/1.5.0/libexec/lib/flink-dist_2.11-1.5.0.jar]) to field java.nio.Buffer.address
 WARNING: Please consider reporting this to the maintainers of org.apache.flink.core.memory.HybridMemorySegment
 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


The log4j warnings just mean that log4j hasn't been initialized; no big deal.

The "Illegal reflective access" warnings look like the warnings you see when running Java 8-only software under Java 9 or Java 10.

This happens even when I set `JAVA_HOME` to point at my JDK 8 installation.

I suspect this is because the `` script calls plain `java` instead of using the `$JAVA_RUN` variable set in flink's ``, which it called earlier, and which seems to respect `$JAVA_HOME`. From ``:

   java -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell $@ --addclasspath "$EXT_CLASSPATH"
   java -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell $@

Should `` be changed to use `$JAVA_HOME` like the other scripts in `libexec`?

This message was sent by Atlassian JIRA

( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-flink-development/msg07372.html on line 138
Call Stack
10.0001357664{main}( ).../msg07372.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-flink-development/msg07372.html on line 138
Call Stack
10.0001357664{main}( ).../msg07372.html:0