You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Benoît (JIRA)" <ji...@apache.org> on 2018/09/10 08:54:00 UTC

[jira] [Updated] (BUILDR-736) Running on JRuby w/ Java 9 throws an IllegalArgumentException

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

Benoît updated BUILDR-736:
--------------------------
    Summary: Running on JRuby w/ Java 9 throws an IllegalArgumentException   (was: Running JRuby w/ Java 9 throws an IllegalArgumentException )

> Running on JRuby w/ Java 9 throws an IllegalArgumentException 
> --------------------------------------------------------------
>
>                 Key: BUILDR-736
>                 URL: https://issues.apache.org/jira/browse/BUILDR-736
>             Project: Buildr
>          Issue Type: Bug
>            Reporter: Benoît
>            Priority: Blocker
>
> Hi,
> My setup is
>  * jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 Java HotSpot(TM) 64-Bit Server VM 9.0.4+11 on 9.0.4+11 +jit [linux-x86_64]
>  * java 9.0.4
>  * buildr 1.5.6 
> Trying to build a project results in an illegal reflective access warning and an exception at lib/**buildr/java/jruby.rb:121. 
>  
> {quote}WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.jruby.javasupport.JavaMethod to method java.net.URLClassLoader.addURL(java.net.URL)
> WARNING: Please consider reporting this to the maintainers of org.jruby.javasupport.JavaMethod
> 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
> {quote}
>  
> {quote}Buildr aborted!
> Java::JavaLang::IllegalArgumentException : object is not an instance of declaring class
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62)
> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)
> java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:564)
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62)
> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)
> java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:564)
> org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:425)
> org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:292)
> RUBY.block in load(/home/bdardenn/.rbenv/versions/jruby-9.2.0.0/lib/ruby/gems/shared/gems/buildr-1.5.6-java/lib/buildr/java/jruby.rb:121)
> {quote}
>  
> The pointed at code does some funky hacks to the classpath, calling addURL on the system class loader, assuming that it is an instance of URLClassLoader. However, this does not seem to be the case (anymore).  



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