Question: Rails (jruby 9.0.5.0): java.lang.IllegalAccessException: Can not set static final boolean field java

Question

Rails (jruby 9.0.5.0): java.lang.IllegalAccessException: Can not set static final boolean field java

Answers 0
Added at 2016-11-11 20:11
Tags
Question

I develop engine for site. Everything was working fine, but one day this bug appeared (see quote). I tried to:

  1. use java 8 oracle and java open jdk,reinstall jruby version via rbenv then.
  2. JCE unlimited strentgth http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html (replaced files in directory, which I got via java "something" command , ,reinstall jruby then ) This bug dissapear, when I use jruby 9.1.5, but there are errors on launched server.

rails new "app" works

     /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/bundler/gems/config-813e504f47d3/lib/config/compatibility.rb:1:in
 `<top>': Use RbConfig instead of obsolete and deprecated Config.
 => Booting Puma
 => Rails 4.2.6 application starting in development on http://0.0.0.0:3000
 => Run `rails server -h` for more startup options
 => Ctrl-C to shutdown server Exiting bundler: failed to load command: bin/rails (bin/rails) LoadError: load error:
 /home/andrey/octoshell/config/environment --
 java.lang.IllegalAccessException: Can not set static final boolean
 field javax.crypto.JceSecurity.isRestricted to java.lang.Boolean  
 org/jruby/RubyKernel.java:937:in `require'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in
 `block in require'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in
 `load_dependency'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in
 `require'   /home/andrey/octoshell/config.ru:3:in `block in
 new_from_string'   org/jruby/RubyBasicObject.java:1633:in
 `instance_eval'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'   /home/andrey/octoshell/config.ru:1:in `<eval>'  
 org/jruby/RubyKernel.java:976:in `eval'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/railties-4.2.6/lib/rails/commands/server.rb:61:in
 `app'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/railties-4.2.6/lib/rails/commands/server.rb:139:in
 `log_to_stdout'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/railties-4.2.6/lib/rails/commands/server.rb:78:in
 `start'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in
 `block in server'   org/jruby/RubyKernel.java:1754:in `tap'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in
 `server'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in
 `run_command!'  
 /home/andrey/.rbenv/versions/jruby-9.0.5.0/lib/ruby/gems/shared/gems/railties-4.2.6/lib/rails/commands.rb:17:in
 `<top>'   org/jruby/RubyKernel.java:937:in `require'   bin/rails:1:in
 `<top>'   org/jruby/RubyKernel.java:955:in `load'   bin/rails:4:in
 `(root)'
Answers
Source Show
◀ Wstecz