users@glassfish.java.net

Re: Deployment contexts with GF v3 Prelude

From: Peter Williams <Pete.Williams_at_Sun.COM>
Date: Sun, 09 Nov 2008 15:48:38 -0800

Bill Kocik wrote:
>
> On 9 Nov, 2008, at 1:16 AM, Peter Williams wrote:
>
>> Can you try this: Ensure the app is properly deployed in one form,
>> server running, etc. Stop the server, toggle the deploy at "/"
>> property, then manually start the server and wait until it says the
>> Rails app is ready again (about 8-12 seconds depending on hardware).
>> Only then, choose <Run> from the project menu and see if it works
>> properly.
>
> Sure. Incidentally, last night I switched this project and NetBeans'
> settings to use the bundled JRuby 1.1.4. There were simply too many
> things I couldn't get to work with 1.1.5 (like debugging).
Not surprising. All testing of 6.5 has been done against 1.1.4. I'm
not surprised there may be something we have to fix.

> So here's what I did:
>
> 1) Server is running. Application is deployed at "/". Root context
> setting is on.
> 2) Stopped server. Turned root context setting off.
> 3) Started GlassFish independently of my application (Services ->
> Servers -> GlassFish v3 Prelude -> Start)
> 4) Waited until I saw this:
>
> INFO: Jruby version is: 1.1.4
> INFO: Starting Rails instances
> INFO: New instance created in 12,128 milliseconds
> INFO: Loading Rails application twittertracks at /
> INFO: Loading twittertracks Application done is 12616 ms
> INFO: GlassFish v3 Prelude startup time : Felix(1915ms) startup
> services(13954ms) total(15869ms)
>
> 5) Right-clicked my application and chose "Run"
> 6) The line "INFO: Started bundle org.glassfish.admin.monitoring-core
> [55]" is added to the server log, and my browser is sent to
> http://localhost:8080/twittertracks/, where I get:
>
> Routing Error
> No route matches "/twittertracks/" with {:method=>:get}
Weird. I can't reproduce this at all. Would you do this for me please
-- modify netbeans.conf to add "-J-Dglassfish.level=FINE". Reproduce
the problem once or twice. File an issue against netbeans
(serverplugins/glassfish_v3) and attach the messages.log file from
NetBeans. I want to see what's up.

What you should see (in the server log window) is the following sequence:

1. server shutdown
2. server start sequence
3. rails start sequence
4. second rails start sequence

It sounds like you never see (4) which means the app was not redeployed,
which explains why it would fail. Can you try this: do steps 1-3
again, but just do the context root setting change and the server
start. Do NOT run the application. Now, in your browser, invoke this
URL:
http://localhost:4848/__asadmin/get?pattern=applications.application.twittertracks.*
(replace fields with proper application name if required -- you can use
"http://localhost:4848/__asadmin/get?pattern=applications.*" to find out
the exact deployment names if I didn't guess correctly).

See what it says for the context root. (Alternatively, you can check
domain.xml, but this technique what our code is invoking to check to see
if redeployment is necessary).

By the way, I reproduced the double // problem and the "no admin
available at localhost:4848 when rails app deployed at slash" problem here.

-Peter


>
> I can repeat step 5 as many times as I like, and all that happens is
> that my browser is sent to the URL NetBeans thinks my app should be
> at; but it's not there. I can, however, access it at "/". If I restart
> the server (apart from the application), 2nd time's the charm, as I've
> been seeing:
>
> INFO: Jruby version is: 1.1.4
> INFO: Starting Rails instances
> INFO: New instance created in 11,922 milliseconds
> INFO: Loading Rails application twittertracks at /twittertracks
>
> --
> Bill Kocik
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>