gpt4 book ai didi

ruby-on-rails - Jruby - 类型错误 : illegal access on 'clone'

转载 作者:太空宇宙 更新时间:2023-11-03 16:14:40 25 4
gpt4 key购买 nike

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.ext.zlib.RubyZlib to field java.util.zip.CRC32.crc
WARNING: Please consider reporting this to the maintainers of org.jruby.ext.zlib.RubyZlib
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
rails aborted!
TypeError: illegal access on 'clone': class org.jruby.javasupport.JavaMethod cannot access a member of class java.lang.Object (in module java.base) with modifiers "protected native"

我突然收到这个错误。任何帮助将不胜感激。

java 版本

openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

最佳答案

您好,我也遇到过与 OpenJDK9 相同的问题。

# java --version
openjdk 9.0.4
OpenJDK Runtime Environment (build 9.0.4+12-Debian-4)
OpenJDK 64-Bit Server VM (build 9.0.4+12-Debian-4, mixed mode)

# jruby -v
jruby 9.1.16.0 (2.3.3) 2018-02-21 8f3f95a OpenJDK 64-Bit Server VM 9.0.4+12-Debian-4 on 9.0.4+12-Debian-4 +jit [linux-x86_64]

activerecord-jdbc-adapter -v 1.3.24

我只是在 gem 级别给出了修复,然后它并没有阻止我继续进行下去。试试这个。转到以下路径中的 driver.rb:

activerecord-jdbc-adapter-1.3.24/lib/arjdbc/jdbc/driver.rb

然后在连接方式中编辑下面这行

properties = self.properties.clone 

将此更改为:

properties = self.properties.dup

关于ruby-on-rails - Jruby - 类型错误 : illegal access on 'clone' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48990230/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com