0
votes

Really Short Story: I'm incredibly frustrated by this issue


Short Story: JRuby-1.7.2 building to a .war using Warbler (1.3.8) deploying to a glassfish v3 server. I can build on my machine and everything works fine, however when I try to build with Jenkins, the war gives the following error when trying to load the first page:

org.jruby.exceptions.RaiseException: (NameError) uninitialized constant ApplicationController::SessionsHelper


Long Story: Build script on our Jenkins server:

#path to rvm
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Use the correct ruby
rvm use "jruby-1.7.2@webadmin"
# Set "fail on error" in bash
set -e
# build
bundle update
warble compiled war

Error log from Glassfish....which I hope has enough info.

[#|2013-05-31T17:10:14.634-0400|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-2;|PWC1412: WebModule[null] ServletContext.log():INFO: pool was empty - getting new application instance|#]

[#|2013-05-31T17:10:25.181-0400|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-2;|PWC1412: WebModule[null] ServletContext.log():An exception happened during JRuby-Rack startup uninitialized constant ApplicationController::SessionsHelper --- System jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on OpenJDK 64-Bit Server VM 1.6.0_27-b27 [linux-amd64] Time: 2013-05-31 17:10:25 -0400 Server: GlassFish Server Open Source Edition 3.1.2.2 jruby.home: classpath:/META-INF/jruby.home

--- Context Init Parameters: com.sun.faces.forceLoadConfiguration = true com.sun.faces.validateXml = true public.root = / rails.env = production

--- Backtrace NameError: uninitialized constant ApplicationController::SessionsHelper

--- RubyGems Gem.dir: /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/gems Gem.path: /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/gems Activated gems: bundler-1.3.5 rake-10.0.4 i18n-0.6.1 multi_json-1.7.4 activesupport-3.2.13 builder-3.0.4 activemodel-3.2.13 erubis-2.7.0 journey-1.0.4 rack-1.4.5 rack-cache-1.2 rack-test-0.6.2 hike-1.2.2 tilt-1.4.1 sprockets-2.2.2 actionpack-3.2.13 mime-types-1.23 polyglot-0.3.3 treetop-1.4.12 mail-2.5.4 actionmailer-3.2.13 arel-3.0.2 tzinfo-0.3.37 activerecord-3.2.13 activeresource-3.2.13 gyoku-1.0.0 nokogiri-1.5.9-java akami-1.2.0 bcrypt-ruby-3.0.1-java sass-3.2.9 bootstrap-sass-2.3.1.2 will_paginate-3.0.4 bootstrap-will_paginate-0.0.9 bouncy-castle-java-1.5.0147 coffee-script-source-1.6.2 execjs-1.4.0 coffee-script-2.2.0 rack-ssl-1.3.3 json-1.8.0-java rdoc-3.12.2 thor-0.18.1 railties-3.2.13 coffee-rails-3.2.2 faker-1.1.2 httpi-2.0.2 jquery-rails-2.2.2 jruby-openssl-0.8.8 nori-2.1.0 rails-3.2.13 sass-rails-3.2.6 wasabi-3.1.0 savon-2.2.0 therubyrhino_jar-1.7.4 therubyrhino-2.0.2 uglifier-1.0.4 uuidtools-2.1.4

--- Bundler Bundler.bundle_path: /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/gems Bundler.root: /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF Gemfile: /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/Gemfile Settings: gemfile = /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/Gemfile without = development:test:assets bin_path = /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/gems/gems/bundler-1.3.5/bin/bundle

--- JRuby-Rack Config compat_version = default_logger = org.jruby.rack.logging.StandardOutLogger@62a49a04 equals = err = com.sun.common.util.logging.LoggingOutputStream$LoggingPrintStream@7a21bdb8 filter_adds_html = true filter_verifies_resource = false ignore_environment = false initial_memory_buffer_size = initial_runtimes = jms_connection_factory = jms_jndi_properties = logger = org.jruby.rack.logging.ServletContextLogger@19a2312c logger_class_name = servlet_context logger_name = jruby.rack maximum_memory_buffer_size = maximum_runtimes = num_initializer_threads = out = com.sun.common.util.logging.LoggingOutputStream$LoggingPrintStream@52f8d395 rackup = rackup_path = rewindable = true runtime_arguments = runtime_environment = runtime_timeout_seconds = serial_initialization = false servlet_context = org.apache.catalina.core.ApplicationContextFacade@16c7e149 throw_init_exception = false |#]

[#|2013-05-31T17:10:25.182-0400|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-2;|PWC1412: WebModule[null] ServletContext.log():DEBUG: resetting rack response due exception|#]

1

1 Answers

0
votes

Turns out it was an issue with source code control. My helpers directory was not added and therefore Jenkins was not including in the build. Always check the obvious first, if it says it isn't there it probably isn't.