Wednesday, May 2, 2012

Re: [Rails] jruby/rack stack dumps without reference to my code

On 2 May 2012 17:00, Jedrin <jrubiando@gmail.com> wrote:
I get a stack dump in jruby,

it will say: org.jruby.exceptions.RaiseException: (NoMethodError)
undefined method `log' for nil:NilClass

and then print out a lengthy stack dump. None of the source code lines
given however come from any of my code so I am not sure how to figure
out what is causing the dump or how to change the stack dump.


You may well have a variable that you expect to be set, that is actually nil. When some other code then comes to use that variable later on, it is trying to call the log method on nil. The actual line that is setting the variable to nil isn't in the stack trace because it didn't throw an error. I'd check your code carefully for anything that might be set to nil. Maybe use a debugger to step through the code and check the values of everything.

Of course, it could be nothing to do with that! :)

Jeremy Walker

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate