Open mattnworb opened 7 years ago
3 has been reported in dns-java at https://sourceforge.net/p/dnsjava/bugs/58/ , but I have no idea if anyone watches that sourceforge project or maintains it.
1 and 2 both originate in https://github.com/spotify/ssh-agent-tls
Noting for posterity that the same warnings/problems apply to Java 10 as well.
Reopening as there are still several warnings printed when using Java 9 or 10 about "Illegal reflective access" which I think we should track. #1213 only fixed one issue.
$ java -version
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
Illegal reflective access in com.spotify.helios.client.DefaultHttpConnector
$ helios -z http://localhost:5801 masters
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.spotify.helios.client.DefaultHttpConnector (file:/usr/local/Cellar/helios/0.9.207/libexec/helios-tools-0.9.207-shaded.jar) to field java.net.HttpURLConnection.method
WARNING: Please consider reporting this to the maintainers of com.spotify.helios.client.DefaultHttpConnector
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
9e3182d622e9.
The issue from org.xbill.DNS.ResolverConfig is still there:
$ helios -d site masters
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.spotify.helios.client.shaded.org.xbill.DNS.ResolverConfig (file:/usr/local/Cellar/helios/0.9.207/libexec/helios-tools-0.9.207-shaded.jar) to method sun.net.dns.ResolverConfiguration.open()
WARNING: Please consider reporting this to the maintainers of com.spotify.helios.client.shaded.org.xbill.DNS.ResolverConfig
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
master1
master2
master3
master4
master5
Neither of these prevent the CLI from working but a) it is a big scary warning message that might confuse people b) in a future Java release these operations will be denied.
The DefaultHttpConnector warning is coming from
I'm unclear why this code is using reflection to set this field when HttpUrlConnection.setRequestMethod(String)
has existed for quite a while (at least as far back as Java 1.5) and seems to allow GET, POST, PUT, DELETE, HEAD etc since that far back as well according to the javadocs
Just wanted to add that adding --illegal-access=warn
to the java command that runs helios emits warnings for more methods in org.xbill.DNS.ResolverConfig
:
➜ helios git:(master) ✗ cat /usr/local/bin/helios
#!/bin/bash
exec java --illegal-access=warn -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xverify:none -jar /usr/local/Cellar/helios/0.9.170/libexec/helios-tools-0.9.170-shaded.jar "$@"
➜ helios git:(master) ✗ helios -z http://localhost:5801 masters
WARNING: Illegal reflective access by com.spotify.helios.client.DefaultHttpConnector (file:/usr/local/Cellar/helios/0.9.170/libexec/helios-tools-0.9.170-shaded.jar) to field java.net.HttpURLConnection.method
WARNING: Illegal reflective access by org.xbill.DNS.ResolverConfig (file:/usr/local/Cellar/helios/0.9.170/libexec/helios-tools-0.9.170-shaded.jar) to method sun.net.dns.ResolverConfiguration.open()
WARNING: Illegal reflective access by org.xbill.DNS.ResolverConfig (file:/usr/local/Cellar/helios/0.9.170/libexec/helios-tools-0.9.170-shaded.jar) to method sun.net.dns.ResolverConfiguration.nameservers()
WARNING: Illegal reflective access by org.xbill.DNS.ResolverConfig (file:/usr/local/Cellar/helios/0.9.170/libexec/helios-tools-0.9.170-shaded.jar) to method sun.net.dns.ResolverConfiguration.searchlist()
b07806a15aa3.
After applying #1245, I still see the following transitive error.
helios -z https://heliosmaster:443 -k masters
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.xbill.DNS.ResolverConfig (file:/Users/dxia/.m2/repository/dnsjava/dnsjava/2.1.7/dnsjava-2.1.7.jar) to method sun.net.dns.ResolverConfiguration.open()
WARNING: Please consider reporting this to the maintainers of org.xbill.DNS.ResolverConfig
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
...
Process finished with exit code 0
Upgrading dnsjava:dnsjava to 2.1.8 doesn't help. Outstanding bug report here.
I'm unclear why this code is using reflection to set this field when
HttpUrlConnection.setRequestMethod(String)
has existed for quite a while (at least as far back as Java 1.5) and seems to allow GET, POST, PUT, DELETE, HEAD etc since that far back as well according to the javadocs
@mattnworb Looks like using that method causes everything to blow up. See failed tests here https://github.com/spotify/helios/pull/1245.
I am creating this issue to start to catalog some incompatibilities with Java 9's new module system.
~/.helios
directory contains cached certificates, an exception is encountered when loading them and the operation never succeeds.with more logs:
java.lang.NoClassDefFoundError: org/omg/CORBA/portable/IDLEntity
when generating the certificate.--domains
(or-d
) flag to have the helios masters looked up dynamically, a warning is output about "illegal reflective access" (and then the request fails as 2 above). Note that this warning does not prevent the action but currently (in Java 9) just warns about it - in the future it will be denied.