Skip to content

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

@donv

Description

@donv

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions