Missing translation for "--illegal-access"; Hadoop problems with build 175

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Missing translation for "--illegal-access"; Hadoop problems with build 175

Uwe Schindler
Hi,

I was trying the recent non-jigsaw build 175 of JDK 9. This one now has the "--illegal-access" setting. But on my German Windows system this has wrong help text on the command line:

C:\...>java -X
[...]
    --permit-illegal-access
                      Lässt unzulässigen Zugriff für Mitglieder mit den Typen in den benannten Modulen
                      nach Code in unbenannten Modulen zu. Diese Kompatibilitätsoption wird
                      im nächsten Release entfernt.
[...]

Of course this command line option no longer works:

C:\...>java --permit-illegal-access -version
Unrecognized option: --permit-illegal-access
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

C:\...>java --illegal-access=deny -version
java version "9"
Java(TM) SE Runtime Environment (build 9+175)
Java HotSpot(TM) 64-Bit Server VM (build 9+175, mixed mode)

So I just wanted to give you some feedback that translations are obviously missing. FYI, the Linux version in English returns the correct text. As build 175 seems to be the first release candidate (it no longer has "-ea" in the version string), this is something to take care.

FYI, the new version string (just "9") again caused some serious problem in open source projects. This time Hadoop, see https://issues.apache.org/jira/browse/HADOOP-14586. Issue is the following static final constant, leading to NoClassDefFound error and a cascade of classes no longer initializing:
private static boolean IS_JAVA7_OR_ABOVE =
      System.getProperty("java.version").substring(0, 3).compareTo("1.7") >= 0;

Damn! 😊 (the above code is IMHO just horrible wrong, never ever do something like this). In a ddition, it no even has a doPrivileged!

Uwe

-----
Uwe Schindler
[hidden email]
ASF Member, Apache Lucene PMC / Committer
Bremen, Germany
http://lucene.apache.org/


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Missing translation for "--illegal-access"; Hadoop problems with build 175

Alan Bateman
On 26/06/2017 08:35, Uwe Schindler wrote:
> :
>
> So I just wanted to give you some feedback that translations are obviously missing. FYI, the Linux version in English returns the correct text.
The last translation drop went into jdk-9+172 so it's out of sync with
the CLI/usage messages in builds since then. In addition to
--illegal-access, there are a few other changes to, and at least one
new, error message(s) that also need updated translations.

>
> FYI, the new version string (just "9") again caused some serious problem in open source projects. This time Hadoop, see https://issues.apache.org/jira/browse/HADOOP-14586. Issue is the following static final constant, leading to NoClassDefFound error and a cascade of classes no longer initializing:
> private static boolean IS_JAVA7_OR_ABOVE =
>        System.getProperty("java.version").substring(0, 3).compareTo("1.7") >= 0;
>
> Damn! 😊 (the above code is IMHO just horrible wrong, never ever do something like this). In a ddition, it no even has a doPrivileged!
>
jdk-9+175 was supposed to be the first GA candidate so this is why the
pre-release identifier "ea" was dropped. Hopefully the Hadoop
maintainers will read JEP 223 to see how to parse version strings going
forward.

-Alan.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Missing translation for "--illegal-access"; Hadoop problems with build 175

Gunnar Morling
> jdk-9+175 was supposed to be the first GA candidate so this is
> why the pre-release identifier "ea" was dropped. Hopefully the
> Hadoop maintainers will read JEP 223 to see how to parse version
> strings going forward.

I noticed that at least two popular Maven plug-ins are affected, too: the
Maven JavaDoc plug-in and the Enforcer plug-in.

They both use rather old versions of Apache Commons Lang (2.x) whose
utility method SystemUtils#getJavaVersionAsFloat() runs into a
StringIndexOutOfBoundsException due to the changed version format as of
b175. Perhaps some Apache committers are present here who could take a look
at this one?





2017-06-26 10:00 GMT+02:00 Alan Bateman <[hidden email]>:

> On 26/06/2017 08:35, Uwe Schindler wrote:
>
>> :
>>
>> So I just wanted to give you some feedback that translations are
>> obviously missing. FYI, the Linux version in English returns the correct
>> text.
>>
> The last translation drop went into jdk-9+172 so it's out of sync with the
> CLI/usage messages in builds since then. In addition to --illegal-access,
> there are a few other changes to, and at least one new, error message(s)
> that also need updated translations.
>
>
>> FYI, the new version string (just "9") again caused some serious problem
>> in open source projects. This time Hadoop, see
>> https://issues.apache.org/jira/browse/HADOOP-14586. Issue is the
>> following static final constant, leading to NoClassDefFound error and a
>> cascade of classes no longer initializing:
>> private static boolean IS_JAVA7_OR_ABOVE =
>>        System.getProperty("java.version").substring(0,
>> 3).compareTo("1.7") >= 0;
>>
>> Damn! [image: 😊] (the above code is IMHO just horrible wrong, never
>> ever do something like this). In a ddition, it no even has a doPrivileged!
>>
>> jdk-9+175 was supposed to be the first GA candidate so this is why the
> pre-release identifier "ea" was dropped. Hopefully the Hadoop maintainers
> will read JEP 223 to see how to parse version strings going forward.
>
> -Alan.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Missing translation for "--illegal-access"; Hadoop problems with build 175

Uwe Schindler
Hi,

 

Could you please open issues on the two Maven plugins? Please be also sure that you first update your POM file to use the latest version of those plugins. Unfortunately, after a long discussion with Maven people, it does not seem to be possible that Maven enforces a higher plugin version automatically (for commonly used plugins like javadocs, compiler,…) if Java 9 is detected. This brings the additional burden of migrating legacy POMs up to newer plugin versions – unfortunately.

 

About the issue in commons-lang: Unfortunately I am not sure if the old commons-lang v2 is still maintained (I think it’s dead). So I think the two plugins should drop this dependency and migrate to a newer one, or use some other way of detecting Java versions.

 

Uwe

 

-----

Uwe Schindler

[hidden email]

ASF Member, Apache Lucene PMC / Committer

Bremen, Germany

http://lucene.apache.org/

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Gunnar Morling
Sent: Tuesday, June 27, 2017 3:29 PM
To: Alan Bateman <[hidden email]>
Cc: Uwe Schindler <[hidden email]>; jigsaw-dev <[hidden email]>; [hidden email]
Subject: Re: Missing translation for "--illegal-access"; Hadoop problems with build 175

 

> jdk-9+175 was supposed to be the first GA candidate so this is

> why the pre-release identifier "ea" was dropped. Hopefully the

> Hadoop maintainers will read JEP 223 to see how to parse version

> strings going forward.

 

I noticed that at least two popular Maven plug-ins are affected, too: the Maven JavaDoc plug-in and the Enforcer plug-in.

 

They both use rather old versions of Apache Commons Lang (2.x) whose utility method SystemUtils#getJavaVersionAsFloat() runs into a StringIndexOutOfBoundsException due to the changed version format as of b175. Perhaps some Apache committers are present here who could take a look at this one?

 

 

 

 

 

2017-06-26 10:00 GMT+02:00 Alan Bateman <[hidden email] <mailto:[hidden email]> >:

On 26/06/2017 08:35, Uwe Schindler wrote:

:

So I just wanted to give you some feedback that translations are obviously missing. FYI, the Linux version in English returns the correct text.

The last translation drop went into jdk-9+172 so it's out of sync with the CLI/usage messages in builds since then. In addition to --illegal-access, there are a few other changes to, and at least one new, error message(s) that also need updated translations.


FYI, the new version string (just "9") again caused some serious problem in open source projects. This time Hadoop, see https://issues.apache.org/jira/browse/HADOOP-14586. Issue is the following static final constant, leading to NoClassDefFound error and a cascade of classes no longer initializing:
private static boolean IS_JAVA7_OR_ABOVE =
       System.getProperty("java.version").substring(0, 3).compareTo("1.7") >= 0;

Damn! (the above code is IMHO just horrible wrong, never ever do something like this). In a ddition, it no even has a doPrivileged!

jdk-9+175 was supposed to be the first GA candidate so this is why the pre-release identifier "ea" was dropped. Hopefully the Hadoop maintainers will read JEP 223 to see how to parse version strings going forward.

-Alan.

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Missing translation for "--illegal-access"; Hadoop problems with build 175

Gunnar Morling
I am using the latest released versions. But they plug-in developers
are aware of that compatibility issue with b175: the Enforcer plug-in
has been updated to Commons Lang 3.5 just yesterday, for the JavaDoc
plug-in a pull request is pending.

So I'd hope the issue will be fixed in the next released versions of
those plug-ins.

2017-06-27 15:46 GMT+02:00 Uwe Schindler <[hidden email]>:

> Hi,
>
>
>
> Could you please open issues on the two Maven plugins? Please be also sure
> that you first update your POM file to use the latest version of those
> plugins. Unfortunately, after a long discussion with Maven people, it does
> not seem to be possible that Maven enforces a higher plugin version
> automatically (for commonly used plugins like javadocs, compiler,…) if Java
> 9 is detected. This brings the additional burden of migrating legacy POMs up
> to newer plugin versions – unfortunately.
>
>
>
> About the issue in commons-lang: Unfortunately I am not sure if the old
> commons-lang v2 is still maintained (I think it’s dead). So I think the two
> plugins should drop this dependency and migrate to a newer one, or use some
> other way of detecting Java versions.
>
>
>
> Uwe
>
>
>
> -----
>
> Uwe Schindler
>
> [hidden email]
>
> ASF Member, Apache Lucene PMC / Committer
>
> Bremen, Germany
>
> http://lucene.apache.org/
>
>
>
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of Gunnar Morling
> Sent: Tuesday, June 27, 2017 3:29 PM
> To: Alan Bateman <[hidden email]>
> Cc: Uwe Schindler <[hidden email]>; jigsaw-dev
> <[hidden email]>; [hidden email]
> Subject: Re: Missing translation for "--illegal-access"; Hadoop problems
> with build 175
>
>
>
>> jdk-9+175 was supposed to be the first GA candidate so this is
>
>> why the pre-release identifier "ea" was dropped. Hopefully the
>
>> Hadoop maintainers will read JEP 223 to see how to parse version
>
>> strings going forward.
>
>
>
> I noticed that at least two popular Maven plug-ins are affected, too: the
> Maven JavaDoc plug-in and the Enforcer plug-in.
>
>
>
> They both use rather old versions of Apache Commons Lang (2.x) whose utility
> method SystemUtils#getJavaVersionAsFloat() runs into a
> StringIndexOutOfBoundsException due to the changed version format as of
> b175. Perhaps some Apache committers are present here who could take a look
> at this one?
>
>
>
>
>
>
>
>
>
>
>
> 2017-06-26 10:00 GMT+02:00 Alan Bateman <[hidden email]>:
>
> On 26/06/2017 08:35, Uwe Schindler wrote:
>
> :
>
> So I just wanted to give you some feedback that translations are obviously
> missing. FYI, the Linux version in English returns the correct text.
>
> The last translation drop went into jdk-9+172 so it's out of sync with the
> CLI/usage messages in builds since then. In addition to --illegal-access,
> there are a few other changes to, and at least one new, error message(s)
> that also need updated translations.
>
>
> FYI, the new version string (just "9") again caused some serious problem in
> open source projects. This time Hadoop, see
> https://issues.apache.org/jira/browse/HADOOP-14586. Issue is the following
> static final constant, leading to NoClassDefFound error and a cascade of
> classes no longer initializing:
> private static boolean IS_JAVA7_OR_ABOVE =
>        System.getProperty("java.version").substring(0, 3).compareTo("1.7")
>>= 0;
>
> Damn! (the above code is IMHO just horrible wrong, never ever do something
> like this). In a ddition, it no even has a doPrivileged!
>
> jdk-9+175 was supposed to be the first GA candidate so this is why the
> pre-release identifier "ea" was dropped. Hopefully the Hadoop maintainers
> will read JEP 223 to see how to parse version strings going forward.
>
> -Alan.
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Missing translation for "--illegal-access"; Hadoop problems with build 175

Simon Spero
On Tue, Jun 27, 2017 at 11:07 AM, Gunnar Morling <[hidden email]>
wrote:

> I am using the latest released versions. But they plug-in developers are
> aware of that compatibility issue with b175: the Enforcer plug-in has been
> updated to Commons Lang 3.5 just yesterday, for the JavaDoc plug-in a pull
> request is pending.
>

FYSA:
commons-lang 3.5 has a bit better version support, but it is not real
223†.

The latest release of commons-lang is 3.6, which is the first version
tested with jdk 9.
https://issues.apache.org/jira/projects/LANG/versions/12338238

Note that in order for some unit tests to pass, the test runner  has to
open java.lang and java.lang.reflect.
https://issues.apache.org/jira/browse/LANG-1265


Simon
† More 556 - it'll probably work, but it blow up in your face.
It would be nice if j.l.Runtime.Version could be used,  but that begs the
question.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Missing translation for "--illegal-access"; Hadoop problems with build 175

Simon Spero
Of course, the existing commons-lang code is looking at
java.specification.version, which according to .223 need not change for new
versions of the  specification.

" The minor version number, incremented for a minor update release that may
contain [..] revisions to standard APIs mandated by a Maintenance Release
of the relevant Platform Specification"

But

Minor #1 (GA)
  java.version                    1.9.0_20      9.1.2
  java.specification.version      1.9           9


So it's all, um, good?
Loading...