Jruby1.1.2 - rack exception on glassfish : undefined method `each' for 0:Fixnum

I am trying to deploy my first application on glassfish V2 using JRuby
1.1.2 and Warble 0.99 but get this error below.

WebModule[/myapp]Exception caught
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/jruby/rack/servlet_helper.rb
Complete Message
   
51:in write_headers': undefined method each’ for 0:Fixnum
(NoMethodError) from
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/jruby/rack/servlet_helper.rb:44:in
each' from /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/jruby/rack/servlet_helper.rb:44:in write_headers’ from
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/jruby/rack/servlet_helper.rb:34:in
respond' from /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/META-INF/jruby.home/lib/ruby/site_ruby/1.8/builtin/javasupport/proxy/interface.rb:174:in __jcreate_proxy!’ from
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/builder.rb:1
…internal jruby stack elided…

Is this a problem with JRuby, Warble or something else.

  Trænger du til at se det store billede? Kelkoo giver dig gode 

tilbud på LCD TV! Se her http://dk.yahoo.com/r/pat/lcd

On Fri, May 30, 2008 at 2:19 AM, M C [email protected] wrote:

each' from /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/jruby/rack/servlet_helper.rb:44:in write_headers’ from
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/jruby/rack/servlet_helper.rb:34:in
respond' from /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/META-INF/jruby.home/lib/ruby/site_ruby/1.8/builtin/javasupport/proxy/interface.rb:174:in __jcreate_proxy!’ from
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/builder.rb:1
…internal jruby stack elided…

Is this a problem with JRuby, Warble or something else.

Probably JRuby-Rack. A colleague of mine actually managed to generate
close to the same stack trace, but I could not reproduce it and would
still like to find out the cause. Can you give more details on what
you did to get this error?

Thanks!

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Nick,

Thanks for helping out. My application has a launch page without session
handling and then a bunch of other pages with session handling. The
error occurs after the first redirect to one of the pages that requires
sessions. So I guess this may be related to session handling.

Unfortunately it is a bit hard to figure out what is wrong for me
because I can’t reproduce the problem outside the java web container
(and generating/deploying/undeploying war’s takes a lot of time). I also
had problems initially with lack of server logs with I have now happily
solved by looking in your railsconf 2008 slides.

After my first posting - seeing your informative railsconf 2008 slides -
I manged to setup  rails to do servlet container logging which was
very helpful (by default there is not much rails info in the glassfish
log which does make it hard to debug). I also specified the
java_servlet_store and other settings that you suggested in your
presentation. I hoped this would help but now I get a new error instead
at about the same place (see below):

P.S. Your presentation did leave out some interesting details about
where to place the different pieces of code and the exact value of
“page_cache_directory” (ex. for glassfish). So I guessed and
experimented until I got it to work (apparently). I would be really
interesting with a sample hello world showing the 100% correct way of
setting all this up for glassfish.

The new error I got:
WebModule[] ServletContext.log():/!\ FAILSAFE /!\ Fri Jun 06 21:48:26
+0200 2008 Status: 500 Internal Server Error You have a nil object when
you didn’t expect it! You might have expected an instance of
ActiveRecord::Base. The error occurred while evaluating nil.[]
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/cgi/session.rb:305:in
[]' /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:134:in session’
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:166:in
stale_session_check!' /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:114:in session’
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:1131:in
assign_shortcuts' /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/flash.rb:167:in assign_shortcuts_with_flash’
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:518:in
process' /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in process_with_filters’
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in
process_with_session_management_support' /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in process’
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in
handle_request' /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in dispatch’
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in
dispatch_cgi' /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in dispatch’
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/adapter/rails.rb:37:in
serve_rails' /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/adapter/rails.rb:44:in call’
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/jruby/rack/rails.rb:129:in
call' /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/handler/servlet.rb:22:in call’ :1

/Morten

— Den man 2/6/08 skrev Nick S. <[email protected]>:
> Is this a problem with JRuby, Warble or something else.

Probably JRuby-Rack. A colleague of mine actually managed to generate
close to the same stack trace, but I could not reproduce it and would
still like to find out the cause. Can you give more details on what
you did to get this error?

  Trænger du til at se det store billede? Kelkoo giver dig gode 

tilbud på LCD TV! Se her http://dk.yahoo.com/r/pat/lcd

Hi Nick,

GREAT TIP Nick!!!  I did not know jetty-rails! Thanks!

I still got the same error but at least it is consistent and it is much
easier now to try things out in a java container!

I think the problem is that the java container (both jetty and glasfish
with warble) does not create a session on demand. Is your trick about
using the java_servlet_store in your slides incomplete. Is there
anything else I have to do ?

— Den fre 6/6/08 skrev Nick S. <[email protected]>:
Fra: Nick S. <[email protected]>
Emne: Re: [jruby-user] jruby1.1.2 - rack exception on glassfish :
undefined method `each’ for 0:Fixnum
Til: [email protected]
Cc: [email protected]
Dato: fredag 6. juni 2008 22.54

Maybe you can try using jetty-rails to run your app? It uses
JRuby-Rack internally, and may help elucidate where the problem lies.

jruby -S gem install jetty-rails
jruby -S jetty_rails

/Nick

On Fri, Jun 6, 2008 at 3:21 PM, M C <[email protected]> wrote:
> Hi Nick,
>
> Thanks for helping out. My application has a launch page without
session
> handling and then a bunch of other pages with session handling. The
error
> occurs after the first redirect to one of the pages that requires
sessions.
> So I guess this may be related to session handling.
>
> Unfortunately it is a bit hard to figure out what is wrong for me
because
I
> can’t reproduce the problem outside the java web container (and
> generating/deploying/undeploying war’s takes a lot of time). I also
had
> problems initially with lack of server logs with I have now happily
solved
> by looking in your railsconf 2008 slides.
>
> After my first posting - seeing your informative railsconf 2008
slides - I
> manged to setup rails to do servlet container logging which was
very
> helpful (by default there is not much rails info in the glassfish
log
which
> does make it hard to debug). I also specified the
java_servlet_store and
> other settings that you suggested in your presentation. I hoped
this would
> help but now I get a new error instead at about the same place (see
below):
>
> P.S. Your presentation did leave out some interesting details about
where
to
> place the different pieces of code and the exact value of
> “page_cache_directory” (ex. for glassfish). So I guessed and
experimented
> until I got it to work (apparently). I would be really interesting
with a
> sample hello world showing the 100% correct way of setting all this
up for
> glassfish.
>
> The new error I got:
> WebModule[] ServletContext.log():/!\ FAILSAFE /!\ Fri Jun 06
21:48:26 +0200
> 2008 Status: 500 Internal Server Error You have a nil object when
you
didn’t
> expect it! You might have expected an instance of
ActiveRecord::Base. The
> error occurred while evaluating nil.[]
>
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/cgi/session.rb:305:in
> []' &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:134:in &gt; session’
>
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:166:in
> stale_session_check!' &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:114:in &gt; session’
>
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:1131:in
> assign_shortcuts' &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/flash.rb:167:in &gt; assign_shortcuts_with_flash’
>
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:518:in
> process' &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in &gt; process_with_filters’
>
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in
> process_with_session_management_support' &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in &gt; process’
>
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in
> handle_request' &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in &gt; dispatch’
>
/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in
> dispatch_cgi' &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in &gt; dispatch’
>
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/adapter/rails.rb:37:in
> serve_rails' &gt; /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/adapter/rails.rb:44:in &gt; call’
>
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/jruby/rack/rails.rb:129:in
> call' &gt; /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/handler/servlet.rb:22:in &gt; call’ :1
>
> /Morten
>
> — Den man 2/6/08 skrev Nick S. <[email protected]>:
>
>> Is this a problem with JRuby, Warble or something else.
>
> Probably JRuby-Rack. A colleague of mine actually managed to
generate
> close to the same stack trace, but I could not reproduce it and
would
> still like to find out the cause. Can you give more details on what
> you did to get this error?
>
>
>
> ________________________________
> Trænger du til at se det store billede? Kelkoo giver dig gode
tilbud på
LCD
> TV!

  Trænger du til at se det store billede? Kelkoo giver dig gode 

tilbud på LCD TV! Se her http://dk.yahoo.com/r/pat/lcd

Maybe you can try using jetty-rails to run your app? It uses
JRuby-Rack internally, and may help elucidate where the problem lies.

jruby -S gem install jetty-rails
jruby -S jetty_rails

/Nick

On Fri, Jun 6, 2008 at 3:21 PM, M C [email protected] wrote:

problems initially with lack of server logs with I have now happily solved
place the different pieces of code and the exact value of
/Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/cgi/session.rb:305:in
assign_shortcuts_with_flash' /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in call’
close to the same stack trace, but I could not reproduce it and would
still like to find out the cause. Can you give more details on what
you did to get this error?


Trænger du til at se det store billede? Kelkoo giver dig gode tilbud på LCD
TV!


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Fri, Jun 6, 2008 at 5:18 PM, M C [email protected] wrote:

if defined?(JRUBY_VERSION) && defined?($servlet_context)
# Java session store:
config.action_controller.session_store = :java_servlet_store
# Do nothing in impl. - let java handle this.
class CGI::Session::JavaServletStore
def initialize(session, options) end
def restore; end
def update; end
def close; end
end
end

You don’t need this code – JRuby-Rack provides it for you. You should
comment config.action_controller.session_store and delete any trace of
CGI::Session::JavaServletStore in your own code and try again.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

As long as you don’t specify any session store (e.g.,
config.session_store is commented out), :java_servlet_store should be
used as the default. You can verify this by checking your browser
cookies. You should see JSESSIONID instead of the typical Rails/Ruby
cookie name.

/Nick

On Fri, Jun 6, 2008 at 4:27 PM, M C [email protected] wrote:

to do ?
Maybe you can try using jetty-rails to run your app? It uses

Thanks for helping out. My application has a launch page without session
had
below):

/Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:1131:in

`process_with_filters’

`serve_rails’


Trænger du til at se det store billede? Kelkoo giver dig gode tilbud på
LCD
TV!


Trænger du til at se det store billede? Kelkoo giver dig gode tilbud på LCD
TV!


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Just checked - there is no cookie when I run my app in a java container
so no session is established!

Everything works when I run the application from mongrel/webbrick using
CRuby. Heck, it also works when running webbrick from jruby using jruby
script/server!

The only session related difference in the code is what I took from your
slides. I.e.

if defined?(JRUBY_VERSION) && defined?($servlet_context)
    # Java session store:
    config.action_controller.session_store =
:java_servlet_store
    # Do nothing in impl. - let java handle this.
    class CGI::Session::JavaServletStore
      def initialize(session, options) end
      def restore; end
      def update; end
      def close; end
    end
end

— Den fre 6/6/08 skrev Nick S. <[email protected]>:
Fra: Nick S. <[email protected]>
Emne: Re: [jruby-user] jruby1.1.2 - rack exception on glassfish :
undefined method `each’ for 0:Fixnum
Til: [email protected]
Cc: [email protected]
Dato: fredag 6. juni 2008 23.33

As long as you don’t specify any session store (e.g.,
config.session_store is commented out), :java_servlet_store should be
used as the default. You can verify this by checking your browser
cookies. You should see JSESSIONID instead of the typical Rails/Ruby
cookie name.

/Nick

On Fri, Jun 6, 2008 at 4:27 PM, M C <[email protected]> wrote:
> Hi Nick,
>
> GREAT TIP Nick!!! I did not know jetty-rails! Thanks!
>
> I still got the same error but at least it is consistent and it is
much
> easier now to try things out in a java container!
>
> I think the problem is that the java container (both jetty and
glasfish
with
> warble) does not create a session on demand. Is your trick about
using the
> java_servlet_store in your slides incomplete. Is there anything
else I
have
> to do ?
>
> — Den fre 6/6/08 skrev Nick S. <[email protected]>:
>
> Fra: Nick S. <[email protected]>
> Emne: Re: [jruby-user] jruby1.1.2 - rack exception on glassfish :
undefined
> method `each’ for 0:Fixnum
> Til: [email protected]
> Cc: [email protected]
> Dato: fredag 6. juni 2008 22.54
>
> Maybe you can try using jetty-rails to run your app? It uses
> JRuby-Rack internally, and may help elucidate where the problem
lies.
>
> jruby -S gem install jetty-rails
> jruby -S jetty_rails
>
> /Nick
>
> On Fri, Jun 6, 2008 at 3:21 PM, M C <[email protected]>
wrote:
>> Hi Nick,
>>
>> Thanks for helping out. My application has a launch page
without
session
>> handling and then a bunch of other pages with session handling.
The
error
>> occurs after the first redirect to one of the pages that
requires
> sessions.
>> So I guess this may be related to session handling.
>>
>> Unfortunately it is a bit hard to figure out what is wrong for
me
because
> I
>> can’t reproduce the problem outside the java web container (and
>>
> generating/deploying/undeploying war’s takes a lot of time). I
also
> had
>> problems initially with lack of server logs with I have now
happily
solved
>> by looking in your railsconf 2008 slides.
>>
>> After my first posting - seeing your informative railsconf 2008
slides

  • I
    >> manged to setup rails to do servlet container logging which
    was very
    >> helpful (by default there is not much rails info in the
    glassfish log
    > which
    >> does make it hard to debug). I also specified the
    java_servlet_store
    and
    >> other settings that you suggested in your presentation. I hoped
    this
    would
    >> help but now I get a new error instead at about the same place
    (see
    > below):
    >>
    >> P.S. Your presentation did leave out some interesting details
    about
    where
    > to
    >> place the different pieces of code and the exact value of
    >> “page_cache_directory” (ex. for glassfish). So I guessed
    > and
    > experimented
    >> until I got it to work (apparently). I would be really
    interesting
    with a
    >> sample hello world showing the 100% correct way of setting all
    this up
    for
    >> glassfish.
    >>
    >> The new error I got:
    >> WebModule[] ServletContext.log():/!\ FAILSAFE /!\ Fri Jun 06
    > 21:48:26 +0200
    >> 2008 Status: 500 Internal Server Error You have a nil object
    when you
    > didn’t
    >> expect it! You might have expected an instance of
    ActiveRecord::Base.
    The
    >> error occurred while evaluating nil.[]
    >>
    >
    /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/cgi/session.rb:305:in
    >> []' &gt;&gt; &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:134:in &gt;&gt; &gt; session’
    >>
    >
    /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:166:in
    >> stale_session_check!' &gt;&gt; &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:114:in &gt;&gt; session’
    >>
    >
    /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:1131:in
    >> assign_shortcuts' &gt;&gt; &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/flash.rb:167:in &gt;&gt; assign_shortcuts_with_flash’
    >>
    >
    /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:518:in
    >>
    > process' &gt;&gt; &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in &gt;&gt; process_with_filters’
    >>
    >
    /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in
    >> process_with_session_management_support' &gt;&gt; &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in &gt;&gt; process’
    >>
    >
    /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in
    >>
    > handle_request' &gt;&gt; &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in &gt;&gt; dispatch’
    >>
    >
    /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in
    >> dispatch_cgi' &gt;&gt; &gt; /Library/Java/libs/glassfish/domains/domain1/applications/j2ee-modules/myapp/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in &gt;&gt; dispatch’
    >>
    >
    /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/adapter/rails.rb:37:in
    >> serve_rails' &gt;&gt; &gt; /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/adapter/rails.rb:44:in &gt;&gt; &gt; call’
    >>
    >
    /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/jruby/rack/rails.rb:129:in
    >> call' &gt;&gt; &gt; /Library/Java/libs/glassfish/domains/domain1/generated/jsp/j2ee-modules/myapp/loader/rack/handler/servlet.rb:22:in &gt;&gt; call’ :1
    >>
    >> /Morten
    >>
    >> — Den man 2/6/08 skrev Nick S.
    <[email protected]>:
    >>
    >>> Is this a problem with JRuby, Warble or something else.
    >>
    >> Probably JRuby-Rack. A colleague of mine actually managed to
    generate
    >> close to the same stack trace, but I could not reproduce it and
    would
    >> still like to find out the cause. Can you give more details on
    what
    >> you did to get this error?
    >>
    >>
    >>
    >> ________________________________
    >> Trænger du til at se det store billede? Kelkoo giver dig gode
    tilbud
    på
    > LCD
    >> TV!
    >
    > ________________________________
    > Trænger du til at se det store billede? Kelkoo giver dig gode
    tilbud på
    LCD
    > TV!

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


  ________________________________________________________

Audi, Fiat, Peugeot, Skoda, Porsche, Toyota, Ford - Kelkoo har brugte
biler til en hver smag! Klik her for at sammenligne
priser.(http://dk.yahoo.com/r/pat/mmb)

Thanks for the help Nick

After deleting the code from your slides in my app I got the original
exception back. Using jetty-rails I also relatively quickly manged to
identify the exact code in my controller that causes this.

It seems that the problem occurs when writing to response headers in a
before filter - this works in normal cruby or jruby with webbrick but
fails
when running in a java container (such as glassfish or jetty-rails).

I have reported the problem in greater details in
http://jira.codehaus.org/browse/JRUBY-2620” incl. code to reproduce the
problem.

/Morten

  ___________________________________________________________

Skal du købe ny bil? Sammenlign priser på brugte biler med Kelkoo og
find et godt tilbud! - Se mere her http://dk.yahoo.com/r/pat/mmb