Using gwt:run-codeserver

1.5k Views Asked by At

I have just started to use the gwt maven plugin in my project and everything seems to be working fine. However, debugging is quite hard as I am unable to make superdevmode work correctly and I cannot get the errors to display on my IDE (IntelliJ).

Here is the log when I do gwt:run

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.    SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> gwt-maven-plugin:2.5.0:run (default-cli) @ xxxxxadmin >>>
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-    io:commons-io:jar:1.3.2
[INFO] 
[INFO] --- gwt-maven-plugin:2.5.0:i18n (default) @ xxxxxadmin ---
[INFO] 
[INFO] --- gwt-maven-plugin:2.5.0:generateAsync (default) @ xxxxxadmin ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ xxxxxadmin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 883 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ xxxxxadmin ---
[INFO] Compiling 1 source file to /Users/myuser/git xxxxxadmin/target xxxxxadmin-1.0-SNAPSHOT/WEB-INF/    classes
[INFO] 
[INFO] --- maven-war-plugin:2.1.1:exploded (default) @ xxxxxadmin ---
[INFO] Exploding webapp
[INFO] Assembling webapp  xxxxxadmin] in [/Users/myuser/git xxxxxadmin/target xxxxxadmin-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/myuser/git xxxxxadmin/src/main/webapp]
[INFO] Webapp assembled in [867 msecs]
[INFO] 
[INFO] <<< gwt-maven-plugin:2.5.0:run (default-cli) @ xxxxxadmin <<<
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-    io:commons-io:jar:1.3.2
[INFO] 
[INFO] --- gwt-maven-plugin:2.5.0:run (default-cli) @ xxxxxadmin ---
[INFO] create exploded Jetty webapp in /Users/myuser/git xxxxxadmin/target xxxxxadmin-1.0-SNAPSHOT
[INFO] auto discovered modules [com xxxxx.admin.gwt.portaladmin]
[ERROR] log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.    JspRuntimeContext).
[ERROR] log4j:WARN Please initialize the log4j system properly.
[ERROR] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO] ISC: Configuring log4j from: file:/Users/myuser/git xxxxxadmin/target xxxxxadmin-1.0-SNAPSHOT/    WEB-INF/classes/log4j.isc.config.xml
[INFO] === 2014-05-22 10:50:18,873 [main] INFO  Logger - Logging system started.

Here is the log when I do gwt:run-codeserver

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.    SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> gwt-maven-plugin:2.5.0:run-codeserver (default-cli) @ xxxxxxadmin >>>
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-    io:commons-io:jar:1.3.2
[INFO] 
[INFO] --- gwt-maven-plugin:2.5.0:i18n (default) @ xxxxxxadmin ---
[INFO] 
[INFO] --- gwt-maven-plugin:2.5.0:generateAsync (default) @ xxxxxxadmin ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ xxxxxxadmin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 883 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ xxxxxxadmin ---
[INFO] Compiling 1 source file to /Users/myuser/git/xxxxxxadmin/target/xxxxxxadmin-1.0-SNAPSHOT/WEB-    INF/classes
[INFO] 
[INFO] --- maven-war-plugin:2.1.1:exploded (default) @ xxxxxxadmin ---
[INFO] Exploding webapp
[INFO] Assembling webapp [xxxxxxadmin] in [/Users/myuser/git/xxxxxxadmin/target/xxxxxxadmin-1.0-    SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/myuser/git/xxxxxxadmin/src/main/webapp]
[INFO] Webapp assembled in [815 msecs]
[INFO] 
[INFO] <<< gwt-maven-plugin:2.5.0:run-codeserver (default-cli) @ xxxxxxadmin <<<
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-    io:commons-io:jar:1.3.2
[INFO] 
[INFO] --- gwt-maven-plugin:2.5.0:run-codeserver (default-cli) @ xxxxxxadmin ---
[INFO] auto discovered modules [com.xxxxxx.admin.gwt.portaladmin]
[INFO] workDir: /var/folders/g3/zr930nm51091q0wtc4j8qt1c0000gn/T/gwt-codeserver-7465083041692192607.    tmp
[INFO] binding: user.agent=safari
[INFO] binding: compiler.useSourceMaps=true
[INFO] binding: locale=en
[INFO] Compiling module com.xxxxxx.admin.gwt.portaladmin

Here is the screen I see on the superdevmode codeserver Here is the screen I see when I click "Dev Mode On"

However, when I click the compile button nothing happens. In my previous setup I could see the compilation log and the page reloads once it ends.

As for the gwt:debug run, I have been unable to setup my environment as described here here.

I have run the gwt:debug maven configuration.

gwt:debug maven configuration

and the remote configuration

remote configuration

as per the suggestion. I do get to see the GWT Development Mode window as when I do a gwt:run, but I do not see any log information, only this this

[UPDATE] I have hacked the Bookmarklet code to figure out that if I call the url

http://localhost:9876/recompile/portaladmin?__gwtDevModeSession:portaladmin 

my superdevmode server responds with

[INFO] Compiling module com.xxxxx.admin.gwt.portaladmin
[INFO]    Validating units:
[INFO]       Ignored 80 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO]    Compiling 18 permutations
[INFO]       Compiling permutation 0...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 1...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 2...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 3...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 4...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 5...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 6...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 7...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 8...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 9...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 10...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 11...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 12...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 13...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 14...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 15...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 16...
[INFO]       Source Maps Enabled
[INFO]       Compiling permutation 17...
[INFO]       Source Maps Enabled
[INFO]    Compile of permutations succeeded
[INFO] Linking into /var/folders/g3/zr930nm51091q0wtc4j8qt1c0000gn/T/gwt-codeserver-431669712100879679.tmp/com.xxxxxx.admin.gwt.portaladmin/compile-2/war/portaladmin; Writing extras to /var/folders/g3/zr930nm51091q0wtc4j8qt1c0000gn/T/gwt-codeserver-431669712100879679.tmp/com.xxxxxx.admin.gwt.portaladmin/compile-2/extras/portaladmin
[INFO]    Link succeeded
[INFO]    Compilation succeeded -- 29.577s
[INFO] Compile completed in 29782 ms
[INFO] [ERROR] invalid callback: null

So now we have isolated the error to the Bookmarklets: somehow my bookmarklets do not point to the right server or with the right parameters. Would you please help? Here is what I see when I click on the Dev Mode On bookmarklet properties:

    javascript:{ window.__gwt_bookmarklet_params = {server_url:'http://localhost:9876/',module_name:'portaladmin'}; var s = document.createElement('script'); s.src = 'http://localhost:9876/dev_mode_on.js'; void(document.getElementsByTagName('head')[0].appendChild(s));}

By inspecting the calls to the server, it never gets to do a /recompile AJAX call. Somehow, something is wrong in the dev_mode_on.js file

1

There are 1 best solutions below

1
On

Did you try to get rid of the log4j init problem? When your logging does not work, you often are blind. Is your WEB-INF/classes/log4j.isc.config.xml valid?