nucleus@glassfish.java.net

Re: [v3] JRuby + Phobos extension not working (on the trunk)

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Thu, 05 Jul 2007 13:26:40 -0400

Hi,

Changshin Lee wrote:
> On 7/6/07, Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com> wrote:
>>
>>
>> Changshin Lee wrote:
>> > On 7/6/07, Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com> wrote:
>> >> Hi,
>> >>
>> >> Jeanfrancois Arcand wrote:
>> >> > Hi,
>> >> >
>> >> > Changshin Lee wrote:
>> >> >> On 7/4/07, Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com> wrote:
>> >> >>> Hi,
>> >> >>>
>> >> >>> Changshin Lee wrote:
>> >> >>> > Hi all,
>> >> >>> >
>> >> >>> > Now the GF V3 trunk is fine in building. But unfortunately,
>> JRuby
>> >> >>> > container doesn't work properly when in comes to
>> >> >>> >
>> >> >>> > ActionController::AbstractRequest.relative_url_root = '/hello'
>> >> >>> >
>> >> >>> > option in environment.rb.
>> >> >>> >
>> >> >>> > You can cross-check out the problem by visiting
>> >> >>> >
>> >> >>> > http://ias.lab01.openmaru.com:10011/jruby-hello/
>> >> >>>
>> >> >>> Was it working with v3 before Grizzly 1.5? Let me take a look.
>> >> >>
>> >> >> I just tested it on GF V3 PR b2 and found that it worked fine.
>> >> >
>> >> > OK Thanks. I'm trying to understand what is the problem. When I use
>> >> > grizzly 1.5, it works, but as soon I as integrate in v3, I'm getting
>> >> the
>> >> > error.
>> >>
>> >> Can you manually download from:
>> >>
>> >>
>> http://download.java.net/maven/2/com/sun/grizzly/jruby/1.5-SNAPSHOT/jruby-1.5-SNAPSHOT.jar
>>
>> >>
>> >>
>> >> and save it under
>> >>
>> >> ${v3.home}/lib/jars/jruby-1.5-SNAPSHOT.jar
>> >>
>> >> and see if it works?
>> >
>> > jruby-hello example works fine with the patch.
>>
>> Thanks for confirming.
>>
>> I have a question:
>> > ActionController::AbstractRequest.relative_url_root is not necessary
>> > here?
>>
>> Yes it is. Jerome added it in the Grizzly 1.0 module and was missing in
>> 1.5. Your last email bring me to the conclusion that v3 needs it because
>> it creates context root (where grizzly only support single context,
>> which is a good reason to use v3 :-)). Hence I've added the line by
>> default in Grizzly's dispatch.rb.
>>
>
> I saw the code
>
> ActionController::AbstractRequest.relative_url_root = $root
>
> in dispatch.rb, which I think is quite good because we don't need to
> add the option manually in environment.rb. Are you going to enable
> this feature (by default) officially?

Yes this is done now :-)

Thanks

-- Jeanfrancois

>
> Thanks,
>
> ias
>
>> Thanks
>>
>> -- Jeanfrancois
>>
>>
>> It seems that without the option all the links are generated
>> > with context path prefix.
>> >
>> > Thanks,
>> >
>> > ias
>> >
>> >>
>> >> Thanks for you help.
>> >>
>> >> -- Jeanfrancois
>> >>
>> >>
>> >> >
>> >> > Thanks
>> >> >
>> >> > -- Jeanfrancois
>> >> >
>> >> >>
>> >> >> Cheers,
>> >> >>
>> >> >> ias
>> >> >>
>> >> >>>
>> >> >>> Thanks for the feedback :-)
>> >> >>>
>> >> >>> -- Jeanfrancois
>> >> >>>
>> >> >>> >
>> >> >>> > (GF V3)
>> >> >>> >
>> >> >>> > and
>> >> >>> >
>> >> >>> > http://ias.lab01.openmaru.com:10017/jruby-hello/
>> >> >>> >
>> >> >>> > (WEBrick)
>> >> >>> >
>> >> >>> > When you enter you name at the first view, WEBrick show "Hi ..."
>> >> but
>> >> >>> > GF V3 causes an error.
>> >> >>> >
>> >> >>> > jruby-hello project is available at
>> >> >>> >
>> >> >>>
>> >>
>> http://rubyonrails-for-web-and-enterprise.googlecode.com/svn/trunk/hello/
>> >> >>>
>> >> >>> >
>> >> >>> > (ActionController::AbstractRequest.relative_url_root =
>> '/hello' is
>> >> >>> > commented out, but you should turn it on for reproducing this
>> case)
>> >> >>> >
>> >> >>> > Thanks,
>> >> >>> >
>> >> >>> > ias
>> >> >>> >
>> >> >>> >
>> >> >>> > On 7/4/07, Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com>
>> wrote:
>> >> >>> >> Hi,
>> >> >>> >>
>> >> >>> >> should be fixed by now. Let us know if you still experience
>> >> problems.
>> >> >>> >>
>> >> >>> >> Thanks
>> >> >>> >>
>> >> >>> >> -- Jeanfrancois
>> >> >>> >>
>> >> >>> >> Jeanfrancois Arcand wrote:
>> >> >>> >> > Hi,
>> >> >>> >> >
>> >> >>> >> > the trunk is currently broken for jruby (using the grizzly
>> >> >>> extension,
>> >> >>> >> > works with war file) and Phobos (grizzly extension). If you
>> >> need to
>> >> >>> >> > build v3, please use tag:
>> >> >>> >> >
>> >> >>> >> > GF_V3_PREWORK_BRANCH_GRIZZLY_1_0
>> >> >>> >> >
>> >> >>> >> > Jerome will soon commit the fix (and I will re-promote new
>> >> >>> Grizzly jars
>> >> >>> >> > to accommodate v3 manifest structure).
>> >> >>> >> >
>> >> >>> >> > Thanks
>> >> >>> >> >
>> >> >>> >> > -- Jeanfrancois
>> >> >>> >> >
>> >> >>> >> >
>> >> >>>
>> ---------------------------------------------------------------------
>> >> >>> >> > To unsubscribe, e-mail:
>> dev-unsubscribe_at_glassfish.dev.java.net
>> >> >>> >> > For additional commands, e-mail:
>> dev-help_at_glassfish.dev.java.net
>> >> >>> >> >
>> >> >>> >>
>> >> >>> >
>> >> >>> >
>> >> ---------------------------------------------------------------------
>> >> >>> > To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> >> >>> > For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>> >> >>> >
>> >> >>>
>> >>
>>