1

プロジェクトで gwt maven プラグインの使用を開始したばかりで、すべて正常に動作しているようです。ただし、superdevmode を正しく動作させることができず、IDE (IntelliJ) にエラーを表示できないため、デバッグは非常に困難です。

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.

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

これは、superdevmode codeserver で表示される画面です。 クリックしたときに表示される画面は次のとおりです

ただし、コンパイルボタンをクリックしても何も起こりません。以前のセットアップでは、コンパイル ログを確認でき、ページが終了するとページがリロードされました。

gwt:debug の実行に関しては、こちらで説明されているように環境をセットアップできませんでし

gwt:debug Maven 構成を実行しました。

gwt:Maven 構成のデバッグ

およびリモート構成

リモート構成

提案通り。gwt:run を実行したときと同じように GWT 開発モード ウィンドウが表示されますが、ログ情報は表示されません。これだけです。これ

[更新] ブックマークレットのコードをハッキングして、URL を呼び出すとそれがわかる

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

私のsuperdevmodeサーバーは次のように応答します

[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

これで、エラーをブックマークレットに分離できました。どういうわけか、ブックマークレットが正しいサーバーまたは正しいパラメーターを指していません。助けてくださいませんか?Dev Mode On ブックマークレットのプロパティをクリックすると、次のように表示されます。

    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));}

サーバーへの呼び出しを検査することにより、/recompile AJAX 呼び出しを実行することはありません。どういうわけか、dev_mode_on.js ファイルに何か問題があります

4

1 に答える 1

0

log4j の初期化の問題を解決しようとしましたか? ロギングが機能しない場合、多くの場合、盲目になります。WEB-INF/classes/log4j.isc.config.xml は有効ですか?

于 2014-05-26T09:34:02.877 に答える