Hello people.

I am developing with 1.5/eclipse/cypal-plugin, with some custom
annotations and all goes fine. But fails with gwt1.6 and the google
plugin.

Simple test case. In eclipse create a new gwt project, let's call it just 'g'

Create annotation:

package g.client;

import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Foo {
    public String bar() default "bar";
}

Create class using annotation:

package g.client;

import java.io.Serializable;

public class Thing implements Serializable {

    @Foo(bar = "ok")
    public double id;

    public Thing() {
        id = 25;
    }

    public double getId() {
        return id;
    }
}

"GWT compile project" output:

Compiling module g.G
   Refreshing module from source
      Refreshing TypeOracle
         Processing types in compilation unit:
file:/home/mati/eclipse/g/src/g/client/Thing.java
            Found type 'Thing'
               Resolving annotation '@Foo(bar = "ok")'
                  [ERROR]
java.lang.ClassNotFoundException: g.client.Foo
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at 
com.google.gwt.dev.javac.TypeOracleMediator.getClassLiteral(TypeOracleMediator.java:763)
        at 
com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:831)
        at 
com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:857)
        at 
com.google.gwt.dev.javac.TypeOracleMediator.resolveField(TypeOracleMediator.java:899)
        at 
com.google.gwt.dev.javac.TypeOracleMediator.resolveFields(TypeOracleMediator.java:943)
        at 
com.google.gwt.dev.javac.TypeOracleMediator.resolveTypeDeclaration(TypeOracleMediator.java:1428)
        at 
com.google.gwt.dev.javac.TypeOracleMediator.addNewUnits(TypeOracleMediator.java:389)
        at 
com.google.gwt.dev.javac.TypeOracleMediator.refresh(TypeOracleMediator.java:417)
        at 
com.google.gwt.dev.javac.CompilationState.refresh(CompilationState.java:179)
        at 
com.google.gwt.dev.javac.CompilationState.<init>(CompilationState.java:93)
        at 
com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:264)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:283)
        at com.google.gwt.dev.Compiler.run(Compiler.java:170)
        at com.google.gwt.dev.Compiler$1.run(Compiler.java:124)
        at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:84)
        at 
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:78)
        at com.google.gwt.dev.Compiler.main(Compiler.java:131)
   Compiling 5 permutations
      Permutation compile succeeded
   Linking into war
      Link succeeded
   Compilation succeeded -- 19,961s

Should I just ignore the error?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to