yyang-talend / gwt-ent

Automatically exported from code.google.com/p/gwt-ent
0 stars 0 forks source link

Compile Error - AnnotationsHelper.java (gwtent2.0 and gwt 2.2.0) #47

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I created a project using gwtent2.0 ext-gwt 2.2.4 and gwt 2.2.0. 

In gwtent2.0 there is a class named AnnotationsHelper which calls some excluded 
methods from JClassType. With gwt 2.2.0 JClassType doesnt have a method named 
"getAnnotations". Because of that while compiling the project, i get below 
error.

AnnotationsHelper.class
.....
public static Annotation[] getAnnotations(HasAnnotations annotations){
    if (annotations instanceof JClassType)
      return getAnnotations((JClassType)annotations);
    else if (annotations instanceof JAbstractMethod)
      return getAnnotations((JAbstractMethod)annotations);
    else if (annotations instanceof JField)
      return getAnnotations((JField)annotations);
    else if (annotations instanceof JPackage)
      return getAnnotations((JPackage)annotations);
    else if (annotations instanceof JParameter)
      return getAnnotations((JParameter)annotations);
    else
      return null;
  }

  public static Annotation[] getAnnotations(JClassType classType){
    return classType.getAnnotations();
  }
.....

Error
.....
Rebinding com.gwtent.reflection.client.TypeOracle
            Invoking generator com.gwtent.gen.reflection.Reflection__ProxyGenerator
               [ERROR] com.google.gwt.core.ext.typeinfo.JClassType.getAnnotations()[Ljava/lang/annotation/Annotation;
java.lang.NoSuchMethodError: 
com.google.gwt.core.ext.typeinfo.JClassType.getAnnotations()[Ljava/lang/annotati
on/Annotation;
    at com.google.gwt.core.ext.typeinfo.AnnotationsHelper.getAnnotations(AnnotationsHelper.java:50)
    at com.gwtent.gen.GenUtils.getClassTypeAnnotationWithMataAnnotation(GenUtils.java:224)
    at com.gwtent.gen.reflection.ReflectAllInOneCreator.getAllReflectionClasses(ReflectAllInOneCreator.java:148)
    at com.gwtent.gen.reflection.ReflectAllInOneCreator.doGetSourceWriter(ReflectAllInOneCreator.java:418)
    at com.gwtent.gen.LogableSourceCreator.getSourceWriter(LogableSourceCreator.java:137)
    at com.gwtent.gen.LogableSourceCreator.generate(LogableSourceCreator.java:109)
    at com.gwtent.gen.reflection.Reflection__ProxyGenerator.generate(Reflection__ProxyGenerator.java:33)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:662)
    at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:74)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:259)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:248)
    at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
    at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:106)
.....

Does anyone have any idea? 
Thanks in advance

Original issue reported on code.google.com by taner.al...@eteration.com on 2 Aug 2011 at 1:36