Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception java.lang.Error thrown while initializing thread_safe ConcurrentHashMapV8 #2596

Closed
donv opened this issue Feb 13, 2015 · 1 comment

Comments

@donv
Copy link
Member

donv commented Feb 13, 2015

Hi!

We are upgrading to ActiveRecord 4.0.13 which requires ActiveSupport 4.0.13 which requires thread_safe 0.1.0 or later. The Ruboto tooling unpacks the gem files from thread_safe into our app and expands the included jar from the gem into our app. The tooling also adds an initialization script to activate the JRuby extention service:

require 'jruby'
public
Java::thread_safe.JrubyCacheBackendService.new.basicLoad(JRuby.runtime)

This runs OK, but later we get this exception:

20150213 175947.511756 W/dalvikvm( 1459): Exception Ljava/lang/Error; thrown while initializing Lorg/jruby/ext/thread_safe/jsr166e/ConcurrentHashMapV8;
20150213 175947.515924 W/dalvikvm( 1459): Exception Ljava/lang/NullPointerException; thrown while initializing Lorg/jruby/ext/thread_safe/JRubyCacheBackendLibrary$JRubyCacheBackend;
20150213 175947.515949 I/System.out( 1459): Exception in load active support: load error: active_support/inflector/inflections -- java.lang.ExceptionInInitializerError: null
20150213 175947.517934 I/System.out( 1459): org/jruby/RubyKernel.java:1071:in `require'
20150213 175947.519291 I/System.out( 1459): file:/data/app/no.datek.nettbuss.operator-1.apk!/active_support/inflector/methods.rb:3:in `(root)'
20150213 175947.539166 I/System.out( 1459): org/jruby/RubyKernel.java:1071:in `require'
20150213 175947.561805 I/System.out( 1459): file:/data/app/no.datek.nettbuss.operator-1.apk!/active_support/dependencies/autoload.rb:1:in `(root)'
20150213 175947.561911 I/System.out( 1459): org/jruby/RubyKernel.java:1071:in `require'
20150213 175947.561927 I/System.out( 1459): file:/data/app/no.datek.nettbuss.operator-1.apk!/active_support/dependencies/autoload.rb:1:in `(root)'
20150213 175947.561939 I/System.out( 1459): org/jruby/RubyKernel.java:1071:in `require'
20150213 175947.562762 I/System.out( 1459): file:/data/app/no.datek.nettbuss.operator-1.apk!/active_support.rb:1:in `(root)'
20150213 175947.562783 I/System.out( 1459): org/jruby/RubyProc.java:271:in `call'
20150213 175947.563837 I/System.out( 1459): file:/data/app/no.datek.nettbuss.operator-1.apk!/active_support.rb:25:in `(root)'
20150213 175947.563860 I/System.out( 1459): org/jruby/RubyProc.java:271:in `call'
20150213 175947.563873 I/System.out( 1459): /data/app/no.datek.nettbuss.operator-1.apk!/setup_load_path.rb:1:in `(root)'

I am not sure where to start debugging this. Our app runs well with ActiveRecord 3.2.x, but with ActiveRecord 5 coming this year, version 3.2 is getting really old, and we need to upgrade.

Any help is appreciated.

@donv
Copy link
Member Author

donv commented Feb 16, 2015

Found and fixed here: ruby-concurrency/thread_safe#4

@donv donv closed this as completed Feb 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant