flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chesnay Schepler (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-9445) scala-shell uses plain java command
Date Thu, 09 May 2019 07:54:00 GMT

     [ https://issues.apache.org/jira/browse/FLINK-9445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Chesnay Schepler updated FLINK-9445:
    Summary: scala-shell uses plain java command  (was: start-scala-shell.sh fails on macOS
when Java 9 & 10 are installed)

> scala-shell uses plain java command
> -----------------------------------
>                 Key: FLINK-9445
>                 URL: https://issues.apache.org/jira/browse/FLINK-9445
>             Project: Flink
>          Issue Type: Bug
>          Components: Command Line Client
>    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
>            Assignee: Chesnay Schepler
>            Priority: Minor
> I'm attempting to install and test apache-flink 1.5.0 on macOS using Homebrew.
> The test step runs flink's `start-scala-shell.sh` 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/start-scala-shell.sh local
> Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/tmp/apache-flink-test-20180526-20068-19gl4zf
> 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 [http://logging.apache.org/log4j/1.2/faq.html#noconfig] for more info.
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.apache.flink.core.memory.HybridMemorySegment
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
> 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 `start-scala-shell.sh` script calls plain `java` instead
of using the `$JAVA_RUN` variable set in flink's `config.sh`, which it called earlier, and
which seems to respect `$JAVA_HOME`. From `start-scala-shell.sh`:
> then
>    java -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell
$@ --addclasspath "$EXT_CLASSPATH"
> else
>    java -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell
> fi
> Should `start-scala-shell.sh` be changed to use `$JAVA_HOME` like the other scripts in

This message was sent by Atlassian JIRA

View raw message