Issue with OmniAuth and JRuby
-----------------------------

                 Key: JRUBY-5801
                 URL: http://jira.codehaus.org/browse/JRUBY-5801
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Java Integration
    Affects Versions: JRuby 1.6.1
         Environment: Tomcat 7
            Reporter: Eric Fleming


I am deploying a rails app that contains the OmniAuth gem to a Tomcat 7 
environment.  The app is deployed fine but upon first hitting the app I get the 
following stack trace:

SEVERE: Error: application initialization failed
org.jruby.rack.RackInitializationException: unable to create shared application 
instance
        at 
org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:39)
        at 
org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:44)
        at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
        at 
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
        at 
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: org.jruby.rack.RackInitializationException: undefined method `[]' 
for nil:NilClass
        from org/jruby/RubyKernel.java:2021:in `instance_eval'
        from 
file:/opt/tomcat7/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.8.jar!/vendor/rack-1.2.2/rack/builder.rb:46:in
 `initialize'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/oa-core-0.2.5/lib/omniauth/builder.rb:7:in
 `initialize'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.0.7/lib/action_dispatch/middleware/stack.rb:33:in
 `build'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.0.7/lib/action_dispatch/middleware/stack.rb:79:in
 `build'
        from org/jruby/RubyArray.java:1602:in `each'
        from org/jruby/RubyEnumerable.java:820:in `inject'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.0.7/lib/action_dispatch/middleware/stack.rb:79:in
 `build'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/railties-3.0.7/lib/rails/application.rb:162:in
 `app'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/railties-3.0.7/lib/rails/application/finisher.rb:35:in
 `Finisher'
        from org/jruby/RubyKernel.java:2038:in `instance_exec'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/railties-3.0.7/lib/rails/initializable.rb:25:in
 `run'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/railties-3.0.7/lib/rails/initializable.rb:50:in
 `run_initializers'
        from org/jruby/RubyArray.java:1602:in `each'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/railties-3.0.7/lib/rails/initializable.rb:49:in
 `run_initializers'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/railties-3.0.7/lib/rails/application.rb:134:in
 `initialize!'
        from org/jruby/RubyKernel.java:2052:in `send'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/railties-3.0.7/lib/rails/application.rb:77:in
 `method_missing'
        from /opt/tomcat7/webapps/ROOT/WEB-INF/config/environment.rb:5:in 
`(root)'
        from org/jruby/RubyKernel.java:1038:in `require'
        from /opt/tomcat7/webapps/ROOT/WEB-INF/config/environment.rb:239:in 
`require'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in
 `load_dependency'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in
 `new_constants_in'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in
 `load_dependency'
        from 
/opt/tomcat7/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in
 `require'
        from 
file:/opt/tomcat7/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.8.jar!/jruby/rack/rails.rb:169:in
 `load_environment'
        from 
file:/opt/tomcat7/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.8.jar!/jruby/rack/rails.rb:173:in
 `to_app'
        from 
file:/opt/tomcat7/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.8.jar!/jruby/rack/rails.rb:193:in
 `new'
        from <web.xml>:1:in `(root)'
        from org/jruby/RubyKernel.java:2021:in `instance_eval'
        from 
file:/opt/tomcat7/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.8.jar!/vendor/rack-1.2.2/rack/builder.rb:46:in
 `initialize'
        from <web.xml>:1:in `(root)'

        at 
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:224)
        at 
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:57)
        at 
org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:27)
        ... 9 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to