logo       

[jruby-user] JRuby on Rails on WebSphere: msg#00179

lang.jruby.user

Subject: [jruby-user] JRuby on Rails on WebSphere

Hello,

We're having a problem running JRuby 1.0.1 + Rails 1.2.5.7919 +
WebSphere 6.0.0.1.

The problem is that an exception is thrown whenever rails tries to parse
parameters from an HTTP POST. The stack trace in the log file looks
something like this:

/!\ FAILSAFE /!\ Mon Nov 19 11:19:14 EST 2007
Status: 500 Internal Server Error
Illegal seek
action_controller/request.rb:385:in
`parse_formatted_request_parameters'
action_controller/cgi_process.rb:83:in `request_parameters'
action_controller/request.rb:279:in `parameters'
action_controller/request.rb:19:in `method'
action_controller/routing.rb:1456:in `extract_request_environment'
action_controller/routing.rb:1397:in `recognize'
action_controller/dispatcher.rb:169:in `handle_request'
action_controller/dispatcher.rb:114:in `dispatch'
action_controller/dispatcher.rb:125:in `dispatch_cgi'
action_controller/dispatcher.rb:9:in `dispatch'
:1

I haven't figured out what exactly is throwing this exception, but it
happens when rails does (basically) this:
@cgi.stdinput.rewind

I verified that @cgi.stdinput is the same as $stdin.

$stdin is set by RailsServlet to be a RubyIO that wraps the
HttpServletRequest input stream. This makes me think that WebSphere is
returning a non-rewindable stream, since this is the only environment
where I've seen the problem. (We've also tried WebSphere CE and webrick
in jruby.) But I also noticed that RubyIO wraps InputStreams with
IOHandlerUnseekable, which throws an exception that ends up saying
"Illegal Seek" when rewind is called.

So my questions are:

(1) Why does calling rewind work in everything (WEBrick and WASCE) other
than WebSphere?

(2) Is JRuby the source of the Illegal Seek error? and should it be
throwing when we (effectively) do a $stdin.rewind?

Thanks,
Matt


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

http://xircles.codehaus.org/manage_email




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise