Forum: JRuby dump format error - stale_session_check

30e4c9142032f31df2fe0d20672a4c2e?d=identicon&s=25 Vipin Vm (vmvipin)
on 2008-12-03 06:03
Hi all,

Am using jruby with rails 2.2.2. Its starting successfully and running.
After 3 or 4 clicks am getting this error.

vipin$ jruby -S jetty_rails -e production -p 3000
JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
2008-12-03 10:20:28.092::INFO:  Logging to STDERR via
org.mortbay.log.StdErrLog
starting 3000
2008-12-03 10:20:28.161::INFO:  jetty-6.1.9
2008-12-03 10:20:28.394::INFO:  NO JSP Support for /, did not find
org.apache.jasper.servlet.JspServlet
2008-12-03 10:20:29.883:/:INFO:  Info: using runtime pool timeout of 30
seconds
2008-12-03 10:20:29.883:/:INFO:  Info: received min runtimes = 1
2008-12-03 10:20:29.883:/:INFO:  Info: received max runtimes = 5
JRuby limited openssl loaded. gem install jruby-openssl for full
support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
GLoc v1.1 running in development mode. Strings can be modified at
runtime.
2008-12-03 10:20:38.209:/:INFO:  Info: add application to the pool. size
now = 1
2008-12-03 10:20:38.226::INFO:  Started
SelectChannelConnector@0.0.0.0:3000

2008-12-03 10:21:21.020:/:INFO:  /!\ FAILSAFE /!\  Wed Dec 03 10:21:21
+0530 2008
  Status: 500 Internal Server Error
  dump format error(    )
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/cgi_process.rb:146:in
`stale_session_check!'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/cgi_process.rb:78:in
`session'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1205:in
`assign_shortcuts'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/flash.rb:166:in
`assign_shortcuts_with_flash'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:519:in
`process'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in
`process_with_filters'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in
`process_with_session_management_support'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in
`process'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in
`handle_request'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in
`dispatch_unlocked'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in
`dispatch'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in
`dispatch_cgi'
    /Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in
`dispatch'
    file:/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:37:in
`serve_rails'
    file:/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:44:in
`call'
    file:/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:145:in
`call'
    file:/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/handler/servlet.rb:17:in
`call'

What could be wrong?
Vipin
80d4834a0649ac28b3582e0d753b9682?d=identicon&s=25 Wyatt Kapastin (wkapa)
on 2008-12-06 03:14
Hi,

I was having this same issue when I upgraded my JRuby/Rails app to JRuby
1.1.5. I finally figured out that it doesn't like it when you put a
BigDecimal in the session.  I had the code below, where account.balance
was a BigDecimal:

session[:balance] = account.balance

When I changed it to following it resolved the issue:

session[:balance] = account.balance.to_f

This issue does not exist in JRuby 1.1.4 or trunk - it seems to be
isolated to 1.1.5.  I'm also not sure if there are other data types that
it doesn't like  in the session... This issue cost me about 2 days, so I
hope this helps you!

-Wyatt



Vipin Vm wrote:
> Hi all,
>
> Am using jruby with rails 2.2.2. Its starting successfully and running.
> After 3 or 4 clicks am getting this error.
>
> vipin$ jruby -S jetty_rails -e production -p 3000
> JRuby limited openssl loaded. gem install jruby-openssl for full
> support.
> http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
> 2008-12-03 10:20:28.092::INFO:  Logging to STDERR via
> org.mortbay.log.StdErrLog
> starting 3000
> 2008-12-03 10:20:28.161::INFO:  jetty-6.1.9
> 2008-12-03 10:20:28.394::INFO:  NO JSP Support for /, did not find
> org.apache.jasper.servlet.JspServlet
> 2008-12-03 10:20:29.883:/:INFO:  Info: using runtime pool timeout of 30
> seconds
> 2008-12-03 10:20:29.883:/:INFO:  Info: received min runtimes = 1
> 2008-12-03 10:20:29.883:/:INFO:  Info: received max runtimes = 5
> JRuby limited openssl loaded. gem install jruby-openssl for full
> support.
> http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
> GLoc v1.1 running in development mode. Strings can be modified at
> runtime.
> 2008-12-03 10:20:38.209:/:INFO:  Info: add application to the pool. size
> now = 1
> 2008-12-03 10:20:38.226::INFO:  Started
> SelectChannelConnector@0.0.0.0:3000
>
> 2008-12-03 10:21:21.020:/:INFO:  /!\ FAILSAFE /!\  Wed Dec 03 10:21:21
> +0530 2008
>   Status: 500 Internal Server Error
>   dump format error(    )
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/cgi_process.rb:146:in
> `stale_session_check!'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/cgi_process.rb:78:in
> `session'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1205:in
> `assign_shortcuts'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/flash.rb:166:in
> `assign_shortcuts_with_flash'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:519:in
> `process'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in
> `process_with_filters'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in
> `process_with_session_management_support'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in
> `process'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in
> `handle_request'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in
> `dispatch_unlocked'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in
> `dispatch'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in
> `dispatch_cgi'
> 
/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in
> `dispatch'
> 
file:/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:37:in
> `serve_rails'
> 
file:/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:44:in
> `call'
> 
file:/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:145:in
> `call'
> 
file:/Developer/ruby/jruby-1.1.5/lib/ruby/gems/1.8/gems/jetty-rails-0.6/lib/jruby-rack-0.9.2.jar!/rack/handler/servlet.rb:17:in
> `call'
>
> What could be wrong?
> Vipin
30e4c9142032f31df2fe0d20672a4c2e?d=identicon&s=25 Vipin Vm (vmvipin)
on 2008-12-06 04:51
Hi Wyatt,

Thanks a lot... let me check with my code regarding BigDecimal :)

Vipin


Wyatt Kapastin wrote:
> Hi,
>
> I was having this same issue when I upgraded my JRuby/Rails app to JRuby
> 1.1.5. I finally figured out that it doesn't like it when you put a
> BigDecimal in the session.  I had the code below, where account.balance
> was a BigDecimal:
>
> session[:balance] = account.balance
>
> When I changed it to following it resolved the issue:
>
> session[:balance] = account.balance.to_f
>
> This issue does not exist in JRuby 1.1.4 or trunk - it seems to be
> isolated to 1.1.5.  I'm also not sure if there are other data types that
> it doesn't like  in the session... This issue cost me about 2 days, so I
> hope this helps you!
>
> -Wyatt
A88c84952a0aa9a4c5c157bd655c4e6d?d=identicon&s=25 Bahaw Anyone (bahaw)
on 2009-02-03 14:50
I have this same issue with Jruby 1.1.5 running RoR 2.2.2.  It is a
known issue as documented here -
http://jira.codehaus.org/browse/JRUBY-3228, which is unassigned as of
the moment.

Vipin Vm wrote:
> Hi Wyatt,
>
> Thanks a lot... let me check with my code regarding BigDecimal :)
>
> Vipin
>
>
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.