GWT Plugin Server startup and Bootstrap.groovy executed twice?

View: New views
2 Messages — Rating Filter:   Alert me  

GWT Plugin Server startup and Bootstrap.groovy executed twice?

by Fred Janon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Is it normal that the application is started twice with the GWT plugin installed (and bootstrap exeuted twice as well)? See highlighted text below.

Thanks

Fred

C:\GwtTutorial>grails -Dserver.port=8090 run-app

Welcome to Grails 1.0.3 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: C:\Grails-1.0.3

Base Directory: C:\GwtTutorial
Running script C:\Grails-1.0.3\scripts\RunApp.groovy
Environment set to development
Found events script in plugin gwt-0.2.4
     [echo] Compiling GWT modules
  [groovyc] Compiling 1 source file to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\classes
     [copy] Copying 1 file to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\resources
Loading with installed plug-ins: ["gwt"] ...
     [copy] Copying 1 file to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial
Running Grails application..
2008-07-23 09:57:50.393::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2008-07-23 09:57:50.565::INFO:  jetty-6.1.4
2008-07-23 09:57:50.753::INFO:  No Transaction manager found - if your webapp requires one, please configure one.
2008-07-23 09:57:50.299:/GwtTutorial:INFO:  Set web app root system property: 'GwtTutorial-development-0.1' = [C:\GwtTutorial\web-app\]
2008-07-23 09:57:50.299:/GwtTutorial:INFO:  Initializing log4j from [file:C:\Documents and Settings\Fred/.grails/1.0.3/projects/GwtTutorial/resources/
log4j.properties]
2008-07-23 09:57:50.315:/GwtTutorial:INFO:  Initializing Spring root WebApplicationContext
[0] spring.GrailsWebApplicationContext Refreshing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb03ee: display name [org.cod
ehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb03ee]; startup date [Wed Jul 23 09:57:53 WST 2008]; parent: org.springframework.web.
context.support.XmlWebApplicationContext@235085
[0] spring.GrailsWebApplicationContext Bean factory for application context [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb
03ee]: org.springframework.beans.factory.support.DefaultListableBeanFactory@30cd64
Bootstrap Init
Bootstrap Init Exit Authors: 1

2008-07-23 09:57:57.982:/GwtTutorial:INFO:  Initializing Spring FrameworkServlet 'grails'
2008-07-23 09:57:58.154::INFO:  Started SelectChannelConnector@...:8090
Server running. Browse to http://localhost:8090/GwtTutorial
  [groovyc] Compiling 2 source files to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\classes
    [javac] Compiling 2 source files to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\classes
2008-07-23 09:57:59.889:/GwtTutorial:INFO:  Destroying Spring FrameworkServlet 'grails'
[6078] spring.GrailsWebApplicationContext Closing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb03ee: display name [org.cod
ehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb03ee]; startup date [Wed Jul 23 09:57:53 WST 2008]; parent: org.springframework.web.
context.support.XmlWebApplicationContext@235085
2008-07-23 09:57:59.889:/GwtTutorial:INFO:  Shutting down log4j
     [echo] Compiling GWT modules
  [groovyc] Compiling 1 source file to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\classes
Loading with installed plug-ins: ["gwt"] ...
2008-07-23 09:58:00.311::INFO:  jetty-6.1.4
2008-07-23 09:58:00.342::INFO:  No Transaction manager found - if your webapp requires one, please configure one.
2008-07-23 09:58:00.529:/GwtTutorial:INFO:  Set web app root system property: 'GwtTutorial-development-0.1' = [C:\GwtTutorial\web-app\]
2008-07-23 09:58:00.529:/GwtTutorial:INFO:  Initializing log4j from [file:C:\Documents and Settings\Fred/.grails/1.0.3/projects/GwtTutorial/resources/
log4j.properties]
2008-07-23 09:58:00.545:/GwtTutorial:INFO:  Initializing Spring root WebApplicationContext
[7015] spring.GrailsWebApplicationContext Refreshing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@e2b745: display name [org.c
odehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@e2b745]; startup date [Wed Jul 23 09:58:00 WST 2008]; parent: org.springframework.web
.context.support.XmlWebApplicationContext@d115db
[7015] spring.GrailsWebApplicationContext Bean factory for application context [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@
e2b745]: org.springframework.beans.factory.support.DefaultListableBeanFactory@15c693a
Bootstrap Init
Bootstrap Init Exit Authors: 1

2008-07-23 09:58:00.061:/GwtTutorial:INFO:  Initializing Spring FrameworkServlet 'grails'
2008-07-23 09:58:00.076::INFO:  Started SelectChannelConnector@...:8090


Re: GWT Plugin Server startup and Bootstrap.groovy executed twice?

by Chris Chen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is due to the GWT plugin generating the RPC stub files for you, which causes Grails to think that the src/java files have changed and forces the system to restart.

I personally find this a bit inconvenient so I have disabled it.  There are two ways to do so:

1) grails -Ddisable.auto.recompile=true run-app, which will essentially disable ALL auto recompile functionality throughout the entire application.  Easy way if you're just focused only on the GWT application development.

2) Change the generated Async RPC files and save it so that the modification time is newer than the timestamp file.  GWT will then acknowledge that you have manually taken over the creation of the RPC files and will no longer autogenerate those for you.  I personally find this more useful.

Although I see the benefits of having the plugin auto-generate the RPC interface files, it is unfortunately still a little inadequate for my needs (ie. exceptions are not added to the signature).  Thus, I have resorted to just using IDEA IntelliJ's own GWT support mechanism to sync my RPC files.  Things work out better that way.

I'm also thinking of eliminating the RPC code generation entirely out of the grails plugin itself.

Hope it helps,
Chris


On Jul 22, 2008, at 7:06 PM, Fred Janon wrote:

Hi,

Is it normal that the application is started twice with the GWT plugin installed (and bootstrap exeuted twice as well)? See highlighted text below.

Thanks

Fred

C:\GwtTutorial>grails -Dserver.port=8090 run-app

Welcome to Grails 1.0.3 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: C:\Grails-1.0.3

Base Directory: C:\GwtTutorial
Running script C:\Grails-1.0.3\scripts\RunApp.groovy
Environment set to development
Found events script in plugin gwt-0.2.4
     [echo] Compiling GWT modules
  [groovyc] Compiling 1 source file to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\classes
     [copy] Copying 1 file to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\resources
Loading with installed plug-ins: ["gwt"] ...
     [copy] Copying 1 file to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial
Running Grails application..
2008-07-23 09:57:50.393::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2008-07-23 09:57:50.565::INFO:  jetty-6.1.4
2008-07-23 09:57:50.753::INFO:  No Transaction manager found - if your webapp requires one, please configure one.
2008-07-23 09:57:50.299:/GwtTutorial:INFO:  Set web app root system property: 'GwtTutorial-development-0.1' = [C:\GwtTutorial\web-app\]
2008-07-23 09:57:50.299:/GwtTutorial:INFO:  Initializing log4j from [file:C:\Documents and Settings\Fred/.grails/1.0.3/projects/GwtTutorial/resources/
log4j.properties]
2008-07-23 09:57:50.315:/GwtTutorial:INFO:  Initializing Spring root WebApplicationContext
[0] spring.GrailsWebApplicationContext Refreshing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb03ee: display name [org.cod
ehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb03ee]; startup date [Wed Jul 23 09:57:53 WST 2008]; parent: org.springframework.web.
context.support.XmlWebApplicationContext@235085
[0] spring.GrailsWebApplicationContext Bean factory for application context [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb
03ee]: org.springframework.beans.factory.support.DefaultListableBeanFactory@30cd64
Bootstrap Init
Bootstrap Init Exit Authors: 1

2008-07-23 09:57:57.982:/GwtTutorial:INFO:  Initializing Spring FrameworkServlet 'grails'
2008-07-23 09:57:58.154::INFO:  Started SelectChannelConnector@...:8090
Server running. Browse to http://localhost:8090/GwtTutorial
  [groovyc] Compiling 2 source files to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\classes
    [javac] Compiling 2 source files to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\classes
2008-07-23 09:57:59.889:/GwtTutorial:INFO:  Destroying Spring FrameworkServlet 'grails'
[6078] spring.GrailsWebApplicationContext Closing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb03ee: display name [org.cod
ehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1bb03ee]; startup date [Wed Jul 23 09:57:53 WST 2008]; parent: org.springframework.web.
context.support.XmlWebApplicationContext@235085
2008-07-23 09:57:59.889:/GwtTutorial:INFO:  Shutting down log4j
     [echo] Compiling GWT modules
  [groovyc] Compiling 1 source file to C:\Documents and Settings\Fred\.grails\1.0.3\projects\GwtTutorial\classes
Loading with installed plug-ins: ["gwt"] ...
2008-07-23 09:58:00.311::INFO:  jetty-6.1.4
2008-07-23 09:58:00.342::INFO:  No Transaction manager found - if your webapp requires one, please configure one.
2008-07-23 09:58:00.529:/GwtTutorial:INFO:  Set web app root system property: 'GwtTutorial-development-0.1' = [C:\GwtTutorial\web-app\]
2008-07-23 09:58:00.529:/GwtTutorial:INFO:  Initializing log4j from [file:C:\Documents and Settings\Fred/.grails/1.0.3/projects/GwtTutorial/resources/
log4j.properties]
2008-07-23 09:58:00.545:/GwtTutorial:INFO:  Initializing Spring root WebApplicationContext
[7015] spring.GrailsWebApplicationContext Refreshing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@e2b745: display name [org.c
odehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@e2b745]; startup date [Wed Jul 23 09:58:00 WST 2008]; parent: org.springframework.web
.context.support.XmlWebApplicationContext@d115db
[7015] spring.GrailsWebApplicationContext Bean factory for application context [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@
e2b745]: org.springframework.beans.factory.support.DefaultListableBeanFactory@15c693a
Bootstrap Init
Bootstrap Init Exit Authors: 1

2008-07-23 09:58:00.061:/GwtTutorial:INFO:  Initializing Spring FrameworkServlet 'grails'
2008-07-23 09:58:00.076::INFO:  Started SelectChannelConnector@...:8090


LightInTheBox - Buy quality products at wholesale price