Skip to content

Error running rspec (LoadError: load error: jopenssl/load -- java.lang.NoClassDefFoundError: org/bouncycastle/asn1/DERBoolean) #2079

@chriskilding

Description

@chriskilding

In my Jruby / Rails project, when I attempt to run my Rspec test suite (on Travis) I get the following error:

LoadError: load error: jopenssl/load -- java.lang.NoClassDefFoundError: org/bouncycastle/asn1/DERBoolean

Note that all previous steps including bundle install, bundle exec rake db:migrate etc work fine. The grief just happens when we hit Rspec for some reason, probably because this is the first point that a significant portion of the Rails app is being loaded up.

This happens on the standard Travis Ubuntu build slave VM, building a Ruby project with jruby-19mode (which was jruby-1.7.16 at the last count), on both OpenJDK AND Oracle JDK.

This is the output of 'bundle install' so you can see which gems are being installed. Being Travis, we can be sure that the VM was built from scratch, and that no other old versions of gems or rubies are hanging around by mistake.

Installing rake 10.3.2
Installing i18n 0.6.11
Installing json 1.8.1
Installing minitest 5.4.2
Using thread_safe 0.3.4
Installing tzinfo 1.2.2
Installing activesupport 4.1.6
Installing builder 3.2.2
Installing erubis 2.7.0
Installing actionview 4.1.6
Installing rack 1.5.2
Installing rack-test 0.6.2
Installing actionpack 4.1.6
Installing mime-types 2.4.3
Installing mail 2.6.1
Installing actionmailer 4.1.6
Installing activemodel 4.1.6
Installing active_model_serializers 0.8.2
Installing arel 5.0.1.20140414130214
Installing activerecord 4.1.6
Installing activerecord-jdbc-adapter 1.3.11
Installing jdbc-postgres 9.3.1102
Installing activerecord-jdbcpostgresql-adapter 1.3.11
Using descendants_tracker 0.0.4
Using ice_nine 0.11.0
Using axiom-types 0.1.1
Installing carrierwave 0.10.0
Installing coderay 1.1.0
Using coercible 1.0.0
Installing diff-lcs 1.2.5
Installing dotenv-deployment 0.0.2
Installing dotenv 0.11.1
Installing dotenv-rails 0.11.1
Using equalizer 0.0.9
Installing factory_girl 4.3.0
Installing thor 0.19.1
Installing railties 4.1.6
Installing factory_girl_rails 4.3.0
Installing ffi 1.9.6
Installing hike 1.2.3
Installing jar-dependencies 0.1.4
Using bundler 1.7.3
Using virtus 1.0.3
Using maven-tools 1.0.5
Using ruby-maven-libs 3.1.1
Using ruby-maven 3.1.1.0.8
Installing jbundler 0.6.4
Installing jruby-jars 1.7.16.1
Using jruby-openssl 0.9.5
Installing jruby-rack 1.1.16
Installing method_source 0.8.2
Installing mono_logger 1.1.0
Installing multi_json 1.10.1
Installing slop 3.6.0
Installing spoon 0.0.4
Installing pry 0.10.1
Installing pry-remote 0.1.8
Installing puma 2.8.2
Installing rack-protection 1.5.3
Installing tilt 1.4.1
Installing sprockets 2.12.2
Installing sprockets-rails 2.2.0
Installing rails 4.1.6
Installing redis 3.1.0
Installing redis-namespace 1.5.1
Installing sinatra 1.4.5
Installing vegas 0.1.11
Installing resque 1.25.2
Installing rufus-scheduler 2.0.24
Installing resque-scheduler 3.0.0
Installing resque-status 0.4.3
Installing rspec-core 2.14.8
Installing rspec-expectations 2.14.5
Installing rspec-mocks 2.14.6
Installing rspec-rails 2.14.2
Installing rubyzip 1.1.6
Installing shoulda-matchers 2.6.2
Installing spring 1.1.3
Installing tzinfo-data 1.2014.9
Installing yard 0.8.7.6
Installing versionist 1.2.1
Installing warbler 1.4.4

FWIW, jbundler is in there because we use a couple of Maven JARs too. It may or may not be messing up the class loading of bouncy castle, but we certainly don't list any bouncy castle or openssl related JARs in the Jarfile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions