我正在尝试在我的gwt应用程序中实现此示例:http://zenoconsulting.wikidot.com/blog:17但是当我尝试编译项目时出现此错误:
Compiling module com.myapp.security.GwtSpringSecurityProject
Validating newly compiled units
Ignored 2 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Scanning for additional dependencies: jar:file:/C:/_work/Eclipse/MyApp/war/WEB-INF/lib/gwt-incubator-20101117-r1766.jar!/com/google/gwt/gen2/table/client/AbstractScrollTable.java
Computing all possible rebind results for 'com.google.gwt.gen2.table.client.AbstractScrollTable.Impl'
Rebinding com.google.gwt.gen2.table.client.AbstractScrollTable.Impl
Could not find an exact match rule. Using 'closest' rule <replace-with class='com.google.gwt.gen2.table.client.AbstractScrollTable.ImplIE6'/> based on fall back values. You may need to implement a specific binding in case the fall back behavior does not replace the missing binding
Scanning for additional dependencies: jar:file:/C:/_work/Eclipse/MyApp/war/WEB-INF/lib/gwt-incubator-20101117-r1766.jar!/com/google/gwt/gen2/table/client/FixedWidthTableImpl.java
Computing all possible rebind results for 'com.google.gwt.gen2.table.client.FixedWidthTableImpl.Impl'
Rebinding com.google.gwt.gen2.table.client.FixedWidthTableImpl.Impl
Could not find an exact match rule. Using 'closest' rule <replace-with class='com.google.gwt.gen2.table.client.FixedWidthTableImpl.ImplIE8'/> based on fall back values. You may need to implement a specific binding in case the fall back behavior does not replace the missing binding
[ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:140)
at com.google.gwt.dev.jjs.impl.TypeMap.internalGet(TypeMap.java:242)
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:138)
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:71)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processExpression(GenerateJavaAST.java:1144)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispatch(GenerateJavaAST.java:577)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessExpression(GenerateJavaAST.java:603)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processStatement(GenerateJavaAST.java:1771)
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispatch(GenerateJavaAST.java:577)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessStatement(GenerateJavaAST.java:638)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processStatements(GenerateJavaAST.java:1846)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processMethod(GenerateJavaAST.java:1513)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processType(GenerateJavaAST.java:501)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST.exec(GenerateJavaAST.java:2958)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:608)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[ERROR] <no source info>: public abstract class java.text.DateFormat
extends java.text.Format
/* fields */
protected [unresolved] Unresolved type java.util.Calendar calendar
protected [unresolved] Unresolved type java.text.NumberFormat numberFormat
public static final [unresolved] int ERA_FIELD
public static final [unresolved] int YEAR_FIELD
public static final [unresolved] int MONTH_FIELD
public static final [unresolved] int DATE_FIELD
public static final [unresolved] int HOUR_OF_DAY1_FIELD
public static final [unresolved] int HOUR_OF_DAY0_FIELD
public static final [unresolved] int MINUTE_FIELD
public static final [unresolved] int SECOND_FIELD
public static final [unresolved] int MILLISECOND_FIELD
public static final [unresolved] int DAY_OF_WEEK_FIELD
public static final [unresolved] int DAY_OF_YEAR_FIELD
public static final [unresolved] int DAY_OF_WEEK_IN_MONTH_FIELD
public static final [unresolved] int WEEK_OF_YEAR_FIELD
public static final [unresolved] int WEEK_OF_MONTH_FIELD
public static final [unresolved] int AM_PM_FIELD
public static final [unresolved] int HOUR1_FIELD
public static final [unresolved] int HOUR0_FIELD
public static final [unresolved] int TIMEZONE_FIELD
private static final [unresolved] long serialVersionUID
public static final [unresolved] int FULL
public static final [unresolved] int LONG
public static final [unresolved] int MEDIUM
public static final [unresolved] int SHORT
public static final [unresolved] int DEFAULT
/* methods */
[unresolved] protected void <init>()
[unresolved] public java.lang.Object clone()
[unresolved] public boolean equals(java.lang.Object)
public final java.lang.String format(java.util.Date)
public final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
public abstract java.lang.StringBuffer format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition)
[unresolved] private static java.text.DateFormat get(int, int, int, Unresolved type java.util.Locale)
[unresolved] public static Unresolved type java.util.Locale[] getAvailableLocales()
[unresolved] public Unresolved type java.util.Calendar getCalendar()
[unresolved] public static final java.text.DateFormat getDateInstance()
[unresolved] public static final java.text.DateFormat getDateInstance(int)
[unresolved] public static final java.text.DateFormat getDateInstance(int, Unresolved type java.util.Locale)
[unresolved] public static final java.text.DateFormat getDateTimeInstance()
[unresolved] public static final java.text.DateFormat getDateTimeInstance(int, int)
[unresolved] public static final java.text.DateFormat getDateTimeInstance(int, int, Unresolved type java.util.Locale)
[unresolved] public static final java.text.DateFormat getInstance()
[unresolved] public Unresolved type java.text.NumberFormat getNumberFormat()
[unresolved] public static final java.text.DateFormat getTimeInstance()
[unresolved] public static final java.text.DateFormat getTimeInstance(int)
[unresolved] public static final java.text.DateFormat getTimeInstance(int, Unresolved type java.util.Locale)
[unresolved] public Unresolved type java.util.TimeZone getTimeZone()
[unresolved] public int hashCode()
[unresolved] public boolean isLenient()
[unresolved] public java.util.Date parse(java.lang.String) throws java.text.ParseException
[unresolved] public abstract java.util.Date parse(java.lang.String, Unresolved type java.text.ParsePosition)
[unresolved] public java.lang.Object parseObject(java.lang.String, Unresolved type java.text.ParsePosition)
[unresolved] public void setCalendar(Unresolved type java.util.Calendar)
[unresolved] public void setLenient(boolean)
[unresolved] public void setNumberFormat(Unresolved type java.text.NumberFormat)
[unresolved] public void setTimeZone(Unresolved type java.util.TimeZone)
/* members */
Unresolved type java.text.DateFormat$DateFormatGetter
Unresolved type java.text.DateFormat$Field
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
[ERROR] at PsTable.java(351): new SimpleDateFormat("MM/dd/yyyy").format(rowValue.getDate())
org.eclipse.jdt.internal.compiler.ast.MessageSend
[ERROR] at PsTable.java(351): return new SimpleDateFormat("MM/dd/yyyy").format(rowValue.getDate());
org.eclipse.jdt.internal.compiler.ast.ReturnStatement
[ERROR] at PsTable.java(350): public String getCellValue(Message rowValue);
com.google.gwt.dev.jjs.ast.JMethod
[ERROR] at PsTable.java(348): final class PsTable$DateColumnDefinition extends AbstractColumnDefinition
com.google.gwt.dev.jjs.ast.JClassType
我在我的应用程序中添加了这个示例的类,我在我的gwt客户端类中创建了一个新的PsTable。
答案 0 :(得分:2)
GWT Incubator的最新版本仅与GWT 2.1兼容,您显然使用GWT 2.3或更高版本(2.3中添加Could not find an exact match rule. Using 'closest' rule…
以支持IE9)。除此之外,GWT 2.2打破了生成器的二进制兼容性(它们必须针对GWT 2.2或更高版本进行重新编译),并且您有充分的理由发生故障。
在GWT Incubator主页上,您应该能够将PaagingScrollTable
用途替换为GWT 2.4&#39; DataGrid
。不可否认,这是一种截然不同的方法(细胞与小部件),但它是现在的发展方向:GWT孵化器已被弃用(有充分理由),你真的不应该使用它,离开如果您的项目使用它,并且绝对不开始在新项目中使用它。