upgraded JRuby to 1.7.3 and 1.7.4, now I have openssl issue

57 views
Skip to first unread message

Rick Beyer

unread,
May 17, 2013, 8:34:05 AM5/17/13
to jruby...@googlegroups.com
I have been using JRuby 1.7.1 to build a war file for my rails app which I then deploy in tomcat.  I have been having issues parsing xml getting the following stacktrace (attached).  So I thought maybe upgrading JRuby to a new version might fix the issue, I installed 1.7.3 and 1.7.4.  I then checked to make sure my jruby version was 1.7.4 from the windows command line.  Then I did jruby -S gem install bundler, jruby -S gem install warbler, jruby -S bundle install  (in my rails directory).  Then I did jruby -S warble   so I have my war file.  I drop it into webapps folder for my tomcat installation, I go to the proper url for my app and I get the following error.  I don't understand what I did wrong.  Everything I google says not to install a gem for openssl and I never have for my rails app.  Any help would be great.:

org.jruby.exceptions.RaiseException: (LoadError) load error: openssl -- java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.openssl.ASN1
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1054)
	at ActiveSupport::Dependencies::Loadable.require(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251)
	at ActiveSupport::Dependencies::Loadable.load_dependency(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236)
	at ActiveSupport::Dependencies::Loadable.require(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251)
	at RUBY.(root)(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/rack-1.4.5/lib/rack/session/cookie.rb:1)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1054)
	at ActiveSupport::Dependencies::Loadable.require(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251)
	at ActiveSupport::Dependencies::Loadable.load_dependency(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236)
	at ActiveSupport::Dependencies::Loadable.require(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251)
	at RUBY.(root)(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/actionpack-3.2.9/lib/action_dispatch/middleware/session/cookie_store.rb:1)
	at org.jruby.RubyModule.const_get(org/jruby/RubyModule.java:2546)
	at RUBY.(root)(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/actionpack-3.2.9/lib/action_dispatch/middleware/session/cookie_store.rb:4)
	at RUBY.(root)(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/application/configuration.rb:1)
	at org.jruby.RubyKernel.tap(org/jruby/RubyKernel.java:1860)
	at RUBY.session_store(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/application/configuration.rb:140)
	at RUBY.default_middleware_stack(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/application.rb:273)
	at RUBY.default_middleware_stack(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/application.rb:237)
	at org.jruby.RubyBasicObject.instance_exec(org/jruby/RubyBasicObject.java:1764)
	at Rails::Initializable::Initializer.run(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/initializable.rb:30)
	at RUBY.app(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/engine.rb:469)
	at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1617)
	at RUBY.Finisher(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/application/finisher.rb:31)
	at RUBY.run_initializers(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/initializable.rb:55)
	at org.jruby.RubyBasicObject.__send__(org/jruby/RubyBasicObject.java:1703)
	at org.jruby.RubyKernel.send(org/jruby/RubyKernel.java:2209)
	at RUBY.run_initializers(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/initializable.rb:54)
	at RUBY.initialize!(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/application.rb:136)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1054)
	at RUBY.method_missing(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/gems/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30)
	at RUBY.(root)(C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/config/environment.rb:5)
	at RUBY.(root)(file:/C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/ProjectActivity/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment3.rb:1)



Pandya, Amit

unread,
May 17, 2013, 4:05:28 PM5/17/13
to jruby...@googlegroups.com, rick....@gmail.com
what jdk version are you using?
--
Warm Regards,

A
mit Pandya

End is not end, In-fact E.N.D is "EFFORT NEVER DIES"
If you get NO in answer, remember N.O. is "NEXT OPPORTUNITY"
Impossible just separate the word - I M Possible

Pandya, Amit

unread,
May 17, 2013, 4:08:03 PM5/17/13
to jruby...@googlegroups.com, rick....@gmail.com
what they said in release not - OpenSSL fixes and updated to newer Bouncy Castle library
so it should work, one thing need to check jdk version?

Rick Beyer

unread,
May 17, 2013, 4:58:52 PM5/17/13
to jruby...@googlegroups.com, rick....@gmail.com
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) Client VM (build 20.12-b01, mixed mode, sharing)

jruby 1.7.1 (1.9.3p327) 2012-12-03 30a153b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_07-b10 [Windows Server 2008-amd64]

I downgraded back to 1.7.1 because while I would like to upgrade and solve the OpenSSL issue, I am more puzzled as to why nokogiri explodes randomly on parsing xml.  It will literally fail on the following xml
<?xml version="1.0" encoding="UTF-8"?>
<log>
</log>

and then a minute later I will run the same code and it will process the SAME xml and not fail.

this time I will actually attach the stack trace.  Placing STDOUT.puts in my controller logic I know that the following code is being processed.  It will open the file with Nokogiri and then fail on the IF statement right below it.  Every time I get the random fail it always happens on that IF statement.  Any thoughts?

   response = system "svn log --verbose --username build --password build #{project.url_path} -r#{rev_from}:#{rev_to} --xml > #{log_file}"
  doc = Nokogiri::XML(File.open(log_file))
      STDOUT.puts "opened the file \n"
  if !doc.css('log logentry').empty?
        STDOUT.puts "passed the if before my do \n"
  doc.css('log logentry').each do |entry|
          STDOUT.puts "before parse_message \n"
stacktrace.txt
Reply all
Reply to author
Forward
0 new messages