Dump format error - stale_session_check


#1

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:insession’
/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:inassign_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:inprocess_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:inprocess’
/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:indispatch_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:indispatch_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:inserve_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:incall’
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


#2

Hi Wyatt,

Thanks a lot… let me check with my code regarding BigDecimal :slight_smile:

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


#3

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:insession’
/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:inassign_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:inprocess_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:inprocess’
/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:indispatch_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:indispatch_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:inserve_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:incall’
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


#4

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 :slight_smile:

Vipin