2014-04-01 44 views
0

我的web应用程序出现问题,运行在Firefox上,并且使用Play!1.2.7,GWT2.6在Windows 7上。我使用Eclipse Kepler作为IDE。如何将gwt-super-dev-mode与通过播放启动的web应用程序相链接!1.2.7

首先,在生产模式下,应用程序工作。问题是使它工作在开发模式下,它启用调试配置。 Firefox的最新版本不支持用于启用开发模式的Firefox插件GWT,因此我们使用“超级开发模式”插件。

如果我理解正确,我们必须先启动应用程序,然后再启动超级开发模式插件。

首先,启动应用程序,在命令行,在应用程序的根,我们做了

  play start 

然后,启动开发者模式,在Eclipse中,我们配置的运行配置Java应用程序:

  Project: MyWebApp 
      Main class: com.google.gwt.dev.codeserver.CodeServer 
      Program arguments: -src app/ App -workDir C:\Users\user\workspace\MyWebApp\ 
      classpath, user entries: 
      gwt-dev-2.6.0.jar - \MyWebApp\lib 
      gwt-user-2.6.0.jar - \MyWebApp\lib 
      gwt-codeserver-2.6.0.jar - \MyWebApp\lib 
      app - - \MyWebApp\ 
      src - C:\play-1.2.7\modules\gwt2-1.8\ 
      play-1.2.7 - C:\ 

当我运行这个Java应用程序,我有以下错误:

  workDir: C:\Users\user\workspace\MyWebApp 
      deleting: C:\Users\user\workspace\MyWebApp\App\compile-1 
      binding: user.agent=safari 
      binding: compiler.useSourceMaps=true 
      binding: locale=en 
      Compiling module App 
       Validating units: 
        Ignored 81 units with compilation errors in first pass. 
      Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. 
       Computing all possible rebind results for 'com.google.gwt.useragent.client.UserAgentAsserter' 
        Rebinding com.google.gwt.useragent.client.UserAgentAsserter 
        Checking rule <generate-with class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/> 
         [WARN] Detected warnings related to 'com.google.gwt.editor.client.SimpleBeanEditorDriver'. Are validation-api-<version>.jar and validation-api-<version>-sources.jar on the classpath? 
         Specify -logLevel DEBUG to see all errors. 
         [WARN] Unknown type 'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in deferred binding rule 
       Compiling 1 permutation 
        Compiling permutation 0... 
        Source Maps Enabled 
       Compile of permutations succeeded 
      Linking into C:\Users\user\workspace\MyWebApp\App\compile-1\war\myModule; Writing extras to C:\Users\user\workspace\MyWebApp\App\compile-1\extras\myModule 
       Invoking Linker Export CompilationResult symbol maps 
        [ERROR] Failed to link 
      com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) 
       at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLinkForOnePermutation(StandardLinkerContext.java:376) 
       at com.google.gwt.dev.Link.finishPermutation(Link.java:480) 
       at com.google.gwt.dev.Link.doSimulatedShardingLink(Link.java:442) 
       at com.google.gwt.dev.Link.link(Link.java:175) 
       at com.google.gwt.dev.Compiler.run(Compiler.java:200) 
       at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:115) 
       at com.google.gwt.dev.codeserver.ModuleState.<init>(ModuleState.java:58) 
       at com.google.gwt.dev.codeserver.CodeServer.makeModules(CodeServer.java:120) 
       at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:95) 
       at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:71) 
       at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:49) 
      java.lang.NoClassDefFoundError: org/json/JSONException 
       at com.google.gwt.thirdparty.debugging.sourcemap.SourceMapGeneratorV3.mergeMapSection(SourceMapGeneratorV3.java:243) 
       at com.google.gwt.core.linker.SymbolMapsLinker.link(SymbolMapsLinker.java:308) 
       at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLinkForOnePermutation(StandardLinkerContext.java:373) 
       at com.google.gwt.dev.Link.finishPermutation(Link.java:480) 
       at com.google.gwt.dev.Link.doSimulatedShardingLink(Link.java:442) 
       at com.google.gwt.dev.Link.link(Link.java:175) 
       at com.google.gwt.dev.Compiler.run(Compiler.java:200) 
       at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:115) 
       at com.google.gwt.dev.codeserver.ModuleState.<init>(ModuleState.java:58) 
       at com.google.gwt.dev.codeserver.CodeServer.makeModules(CodeServer.java:120) 
       at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:95) 
       at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:71) 
       at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:49) 
      Caused by: java.lang.ClassNotFoundException: org.json.JSONException 
       at java.net.URLClassLoader$1.run(Unknown Source) 
       at java.net.URLClassLoader$1.run(Unknown Source) 
       at java.security.AccessController.doPrivileged(Native Method) 
       at java.net.URLClassLoader.findClass(Unknown Source) 
       at java.lang.ClassLoader.loadClass(Unknown Source) 
       at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) 
       at java.lang.ClassLoader.loadClass(Unknown Source) 
       ... 13 more 

你有什么想法来解决这个问题吗? 非常感谢!

问候,

回答

0

我加入了最新的JSON库,以我的类路径,它解决了这一问题。对于Maven用户,将以下内容添加到您的pom.xml中将会防止错误发生。

<dependency> 
    <groupId>org.json</groupId> 
    <artifactId>json</artifactId> 
    <version>20140107</version> 
    <scope>provided</scope> 
</dependency> 

被建议我不确定哪个版本是最好用的。我正在使用GWT 2.6.1

PS:这是类似的另一个问题/回应:https://stackoverflow.com/a/16989851/358006

相关问题