Forum: JRuby Class loading problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bf512c651c47ac6421e41f93dc19c726?d=identicon&s=25 Josh Moore (Guest)
on 2009-04-17 02:32
(Received via mailing list)
Hi, I am working on creating a rails app. template that will create a
base
rails app that is ready for use with the google app engine.  I have
everything working except for the session management.  The problem is
not
releated to gae/J it has to do with loading a class.  Whenever I try to
start the server (locally or on the app engine) i get this exception.

Expected /home/josh/code/gaej_rails/test/lib/big_table_servlet_store.rb
to
define BigTableServletStore (LoadError)
    from
/home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in
`const_missing_with_dependencies'
    from
/home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in
`const_missing'
    from
/home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in
`load_missing_constant'
    from
/home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in
`const_missing_with_dependencies'
    from
/home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in
`load_missing_constant'
    from
/home/josh/code/gaej_rails/test/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in
`const_missing_with_dependencies'
    from
/home/josh/code/gaej_rails/test/vendor/rails/actionpack/lib/action_controller/session_management.rb:18:in
`session_store='
    from
script/../config/../vendor/rails/railties/lib/initializer.rb:580:in
`initialize_framework_settings'
     ... 13 levels...
    from
/home/josh/code/gaej_rails/test/vendor/rails/railties/lib/commands/server.rb:31:in
`require'
    from
/usr/local/share/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
    from script/server:3


I am using the BigTable Session store written by Ola and it is working
fine
for his app.  But, it fails for mine.  Does anybody know what i am
missing
to make this work?  i have required it

Thanks,

Josh
54568ee7ba0c78a836e84c8756a3d681?d=identicon&s=25 Lenny Marks (Guest)
on 2009-04-17 03:51
(Received via mailing list)
On Apr 16, 2009, at 8:31 PM, Josh Moore wrote:

> lib/active_support/dependencies.rb:80:in
>     from /home/josh/code/gaej_rails/test/vendor/rails/activesupport/
> custom_require.rb:31:in `require'
>     from script/server:3
>
>
> I am using the BigTable Session store written by Ola and it is
> working fine for his app.  But, it fails for mine.  Does anybody
> know what i am missing to make this work?  i have required it
>
> Thanks,
>
> Josh

I haven't had any experience with GAE or BigTableServletStore but we
recently saw a similar error in our own Rails apps. In our case, it
was a ruby file that re-opened a java class for extending. Even though
the .rb file was 'required' it turned out that elsewhere there was
some code referencing the Constant triggering Rails to do its
dependency loading thing. Based on the naming conventions it did find
the file but bombed out with that error when it hit the include_class
'my.java.class' line. My solution was to move the .rb file into a
subdir just to make sure it wouldn't get picked up Rails dependencies
loading. Is big_table_servlet_store.rb just a plain old ruby class or
is it an extension of a Java class?

-lenny


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

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.