You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Joseph Witt (JIRA)" <ji...@apache.org> on 2018/05/22 03:30:00 UTC

[jira] [Reopened] (NIFI-5175) NiFi built with Java 1.8 needs to run on Java 9

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

Joseph Witt reopened NIFI-5175:
-------------------------------

[~jtstorck] I reopened this because I believe some work remains.

I am running on Linux Java 10.0.1 and by default the application does not startup and work.  I was getting javax jaxb bind exceptions on startup.  However, if I add the following line to the conf/bootstrap.conf then it works perfectly

java.arg.17=--add-modules=java.xml.bind

I dont think this will work in Java 8 so we cannot keep it as default yet.  However, we possibly could if we also add

java.arg.17=--add-modules=java.xml.bind 
java.arg.18=-XX:+IgnoreUnrecognizedVMOptions

I didn't test that combo though.  I bring this up because in your PR i see you're attempting to set the java.xml.bind value in RunNiFi code but it appears this does not work in Java 10.  We should try to fix it so things will just work in Java 8/10/etc.. without user intervention but worst case we can document how to make it work in Java 10 if we must (and should then backout the special code?)


> NiFi built with Java 1.8 needs to run on Java 9
> -----------------------------------------------
>
>                 Key: NIFI-5175
>                 URL: https://issues.apache.org/jira/browse/NIFI-5175
>             Project: Apache NiFi
>          Issue Type: Sub-task
>            Reporter: Jeff Storck
>            Assignee: Jeff Storck
>            Priority: Major
>             Fix For: 1.7.0
>
>
> The following issues have been encountered while attempting to run a Java 1.8-built NiFi on Java 9:
> ||Issue||Solution||Status||
> |JAXB classes cannot be found on the classpath|Add "--add-modules=java.xml.bind" to the commant that starts NiFi|Done|
> |NiFI boostrap not able to determine PID, restarts nifi after nifi.sh stop|Detect if NiFi is running on Java 9, and reflectively invoke Process.pid(), which was newly added to the Process API in Java 9|Done|
>  
> ----
>  
> ||Unaddressed issues/warnings with NiFi compiled on Java 1.8 running on Java 9+||Description||Solution||
> |WARNING: An illegal reflective access operation has occurred
>  ..._specific class usage snipped_...
>  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|Reflective invocations are common in the code used in NiFi and its dependencies in Java 1.8|Full compliant migration to Java 9 and use dependencies that are Java 9 compliant|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)