public
Last active

JRuby + Rails 3 + MongoMapper == WTF?

  • Download Gist
jruby-exception
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Error during failsafe response: ActionView::Template::Error
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb:1:in `___sers_spejic__rvm_gems_jruby_______safetyscreen_gems_actionpack_______lib_action_dispatch_middleware_templates_rescues__request_and_response_erb___165284610_2208_0'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/template.rb:135:in `render'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/activesupport-3.0.3/lib/active_support/notifications.rb:54:in `instrument'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/template.rb:127:in `render'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:59:in `_render_template'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:56:in `_render_template'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:26:in `render'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb:10:in `___sers_spejic__rvm_gems_jruby_______safetyscreen_gems_actionpack_______lib_action_dispatch_middleware_templates_rescues_diagnostics_erb___1483766424_2204_0'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/template.rb:135:in `render'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/activesupport-3.0.3/lib/active_support/notifications.rb:54:in `instrument'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/template.rb:127:in `render'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:59:in `_render_template'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/activesupport-3.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/activesupport-3.0.3/lib/active_support/notifications.rb:52:in `instrument'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:56:in `_render_template'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_view/render/rendering.rb:26:in `render'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_dispatch/middleware/show_exceptions.rb:88:in `rescue_action_locally'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_dispatch/middleware/show_exceptions.rb:68:in `render_exception'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_dispatch/middleware/show_exceptions.rb:59:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/railties-3.0.3/lib/rails/rack/logger.rb:13:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/rack-1.2.1/lib/rack/runtime.rb:17:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/activesupport-3.0.3/lib/active_support/cache/strategy/local_cache.rb:90:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/rack-1.2.1/lib/rack/lock.rb:11:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/actionpack-3.0.3/lib/action_dispatch/middleware/static.rb:30:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/railties-3.0.3/lib/rails/application.rb:168:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/rack-1.2.1/lib/rack/lint.rb:48:in `_call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/rack-1.2.1/lib/rack/lint.rb:36:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/rack-1.2.1/lib/rack/showexceptions.rb:24:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/rack-1.2.1/lib/rack/commonlogger.rb:18:in `call'
/Users/spejic/.rvm/gems/jruby-1.5.6@safetyscreen/gems/glassfish-1.0.3-universal-java/lib/rack/handler/grizzly.rb:55:in `call'
:1
0:0:0:0:0:0:0:1%0 - - [17/Jan/2011 21:53:51] "POST /users/sign_in " 500 - 1.2590
rails-console-on-save
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
jruby-1.5.6 :003 > u=User.first
=> #<User _id: BSON::ObjectId('4d34ffd1de60ee231a000001'), first_name: "Foo", last_name: "Bar", email: "bla@bla.ca", phone: nil, role: "admin", created_at: Tue, 18 Jan 2011 02:50:13 UTC +00:00, updated_at: Tue, 18 Jan 2011 02:50:13 UTC +00:00, encrypted_password: "$2a$10$thrPSD65E58JfA7Ul5v/POprtzAFc87mvvdszqMhzxpk/YrujHjk2", password_salt: "$2a$10$thrPSD65E58JfA7Ul5v/PO", remember_token: nil, remember_created_at: nil, reset_password_token: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil>
jruby-1.5.6 :004 > u.phone='414-442-4421'
=> "414-442-4421"
jruby-1.5.6 :005 > u.save
Java::JavaLang::NullPointerException: #<Java::JavaLang::NullPointerException:0x1a8202f4>
from org.jruby.ast.ZSuperNode.definition(ZSuperNode.java:108)
from org.jruby.ast.DefinedNode.interpret(DefinedNode.java:86)
from org.jruby.ast.IfNode.interpret(IfNode.java:111)
from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
from org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:113)
from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:140)
from org.jruby.runtime.callsite.SuperCallSite.cacheAndCall(SuperCallSite.java:280)
from org.jruby.runtime.callsite.SuperCallSite.callBlock(SuperCallSite.java:64)
from org.jruby.runtime.callsite.SuperCallSite.call(SuperCallSite.java:69)
from org.jruby.ast.ZSuperNode.interpret(ZSuperNode.java:100)
from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
from org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:180)
from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:174)
from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
... 278 levels...
from org.jruby.RubyKernel.require(RubyKernel.java:967)
from org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.call(org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen:65535)
from org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
from org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
from org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
from script.rails.__file__(rails:6)
from script.rails.load(rails)
from org.jruby.Ruby.runScript(Ruby.java:690)
from org.jruby.Ruby.runNormally(Ruby.java:573)
from org.jruby.Ruby.runFromMain(Ruby.java:416)
from org.jruby.Main.run(Main.java:286)
from org.jruby.Main.run(Main.java:128)
from org.jruby.util.ShellLauncher$ScriptThreadProcess.run(ShellLauncher.java:136)
from java.lang.Thread.run(Thread.java:680)jruby-1.5.6 :006 >

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.