GWT编译问题构造函数StackTraceElement(String,String,String,int)未定义 [英] GWT compilation problem The constructor StackTraceElement(String, String, String, int) is undefined

查看:156
本文介绍了GWT编译问题构造函数StackTraceElement(String,String,String,int)未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中编译我的GWT模块,它继承了我的其他模块(编译时没有问题),并且得到以下输出:

I am compiling my GWT module in Eclipse that inherits my other module (that compiles without problems) and I get this output:

Compiling module mymodule.GWT_TESTS
   Validating newly compiled units
      [ERROR] Errors in 'jar:file:/C:/apath/gwt-2.0.4/gwt-user.jar!/com/google/gwt/core/client/impl/StackTraceCreator.java'
         [ERROR] Line 70: The constructor StackTraceElement(String, String, String, int) is undefined
         [ERROR] Line 80: The constructor StackTraceElement(String, String, String, int) is undefined
         [ERROR] Line 158: The constructor StackTraceElement(String, String, String, int) is undefined
      [ERROR] Errors in 'file:/C:/apath/workspace/GWT_TESTS/src/mymodule/client/GWT_TESTS.java'
         [ERROR] Line 7: The import mymodule.shared.FieldVerifier cannot be resolved
         [ERROR] Line 122: FieldVerifier cannot be resolved
      [ERROR] Errors in 'jar:file:/C:/apath/gwt-2.0.4/gwt-user.jar!/com/google/gwt/user/client/rpc/RpcRequestBuilder.java'
         [ERROR] Line 167: The method getPermutationStrongName() is undefined for the type GWT
      [ERROR] Errors in 'jar:file:/C:/apath/gwt-2.0.4/gwt-user.jar!/com/google/gwt/user/client/ui/TabLayoutPanel.java'
         [ERROR] Line 21: The import com.google.gwt.dom.client.Style.Display cannot be resolved
         [ERROR] Line 22: The import com.google.gwt.dom.client.Style.Unit cannot be resolved
         [ERROR] Line 118: Style.Float cannot be resolved
         [ERROR] Line 143: Unit cannot be resolved to a type
         [ERROR] Line 153: Unit cannot be resolved to a type
         [ERROR] Line 155: Unit cannot be resolved to a type
         [ERROR] Line 161: Unit cannot be resolved
         [ERROR] Line 161: Unit cannot be resolved
         [ERROR] Line 162: Unit cannot be resolved
         [ERROR] Line 167: Unit cannot be resolved
         [ERROR] Line 390: Display cannot be resolved
         [ERROR] Line 397: The method clearDisplay() is undefined for the type Style
         [ERROR] Line 481: Unit cannot be resolved
         [ERROR] Line 481: Unit cannot be resolved
         [ERROR] Line 482: Unit cannot be resolved to a type
         [ERROR] Line 482: Unit cannot be resolved
         [ERROR] Line 484: Display cannot be resolved
      [ERROR] Errors in 'jar:file:/C:/apath/gwt-2.0.4/gwt-user.jar!/com/google/gwt/user/client/ui/SubmitButton.java'
         [ERROR] Line 49: The method getButtonElement() from the type Button is not visible
         [ERROR] Line 62: The method createSubmitButtonElement() is undefined for the type Document
[ERROR] Unexpected
java.lang.NullPointerException
    at com.google.gwt.dev.javac.CompiledClass.<init>(CompiledClass.java:81)
    at com.google.gwt.dev.javac.JdtCompiler$FindTypesInCud.visit(JdtCompiler.java:204)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1198)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:687)
    at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:158)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
    at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:467)
    at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:142)
    at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:281)
    at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:182)
    at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:280)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:502)
    at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)
    at com.google.gwt.dev.Compiler.run(Compiler.java:201)
    at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
    at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
    at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
    at com.google.gwt.dev.Compiler.main(Compiler.java:159)

我的模块定义是:

My module definition is:

<module>
    <inherits name='com.google.gwt.user.User'/>
    <inherits name="com.google.gwt.i18n.I18N"/>
    <inherits name='othermodule.Main' />

    <entry-point class='mymodule.client.GWT_TESTS'/>
</module>

如何解决这种编译问题?我忘了从其他模块继承(我尝试添加那些类未解决,即使它们应该通过用户模块继承,并没有帮助)?我的Eclipse项目设置中是否有任何缺失(mymodule位于单独项目中,配置了GWT,gwt 2.0.4,其他模块和JAR是否设置在项目依赖项中)?

How to resolve this kind of compilation problem? Am I forgetting inheriting from other modules (I tried to add the those where classes were not resolved even they should be inherited via User module and it did not help)? Is there anything in my Eclipse project setting that I am missing (mymodule is in a separate project, GWT configured, gwt 2.0.4, other modules and JARs are set in project dependencies)?

推荐答案

我删除了该项目并重新创建它,现在它可以工作。我最初使用Eclipse插件(2.3.0)附带的GWT,但后来我必须将GWT版本更改为2.0.4。无论是改变现有项目的GWT版本还是我在解决问题时导致错误的其他改变。

I deleted the project and recreated it again and it works now. I originally used GWT that came with Eclipse plugin (2.3.0) but then I had to change GWT version to 2.0.4. Either changing the GWT version for existing project or another of my change when I was resolving the problem caused the error.

这篇关于GWT编译问题构造函数StackTraceElement(String,String,String,int)未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆