Intermittent, improper "undefined method" such as: Undefined method id? for 
module '#<Module:0x64cd6dca>'
---------------------------------------------------------------------------------------------------------

                 Key: JRUBY-6256
                 URL: https://jira.codehaus.org/browse/JRUBY-6256
             Project: JRuby
          Issue Type: Bug
          Components: Application Error, Rails WAR Deployment
    Affects Versions: JRuby 1.6.5
         Environment: Rails 3.0.10, Jruby 1.6.5, Warbler 1.3.2, Tomcat 7, Mysql 
5.1
            Reporter: David Wood


Although our application appears to work when manually tested, an automated 
test that makes concurrent requests to Tomcat running our Warbled WAR sometimes 
produces idiosyncratic problems from within ActiveRecord, such as:

Undefined method id? for module '#<Module:0x64cd6dca>'

{code}
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:294:in 
`(eval)'
org/jruby/RubyModule.java:2254:in `module_eval'
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:290:in 
`define_attribute_methods'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:279:in 
`define_attribute_methods'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:278:in 
`define_attribute_methods'
gems/gems/activerecord-3.0.10/lib/active_record/attribute_methods.rb:13:in 
`define_attribute_methods'
gems/gems/activerecord-3.0.10/lib/active_record/attribute_methods.rb:41:in 
`method_missing'
...<a line of our code that simply accesses a string field on an already loaded 
active record model object>...
{code}

These errors often seem to happen at the beginning of our tests (suggesting a 
possible race between lazy initialization on a first request and following 
requests that come too soon afterwards), though I cannot yet confirm they never 
happens after test start. 

That could mean this is possibly related to JRUBY-6254.

The problem is quite common - we basically see some number of these on every 
test run.

Some additional examples:

Undefined method id_before_type_cast for module '#<Module:0x64cd6dca>'

{code}
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:294:in 
`(eval)'
org/jruby/RubyModule.java:2254:in `module_eval'
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:290:in 
`define_attribute_methods'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:279:in 
`define_attribute_methods'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:278:in 
`define_attribute_methods'
gems/gems/activerecord-3.0.10/lib/active_record/attribute_methods.rb:13:in 
`define_attribute_methods'
gems/gems/activerecord-3.0.10/lib/active_record/attribute_methods.rb:41:in 
`method_missing'
...<NOTE that this is generated from the *exact same* line in our code as the 
different error above>...
{code}

And another example:

Undefined method <name of a method we defined>! for module '#<Module:0xadfa6>'

{code}
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:294:in 
`(eval)'
org/jruby/RubyModule.java:2254:in `module_eval'
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:290:in 
`define_attribute_methods'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:279:in 
`define_attribute_methods'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:278:in 
`define_attribute_methods'
gems/gems/activerecord-3.0.10/lib/active_record/attribute_methods.rb:13:in 
`define_attribute_methods'
gems/gems/activerecord-3.0.10/lib/active_record/attribute_methods.rb:41:in 
`method_missing'
...<in our code, we modify a field on an already loaded activerecord object; 
note that <name of a method we defined>! is - or should be - defined on that 
object's class.>...
{code}



--
This message is automatically generated by JIRA.
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