GWT AutoBean category -
i'm trying @category(class) in autobean work.
i have simple factory
import com.google.web.bindery.autobean.shared.autobean; import com.google.web.bindery.autobean.shared.autobeanfactory.category; @category(testcategory.class) public interface testfactory { autobean<test> test(); }
and category class
import com.google.web.bindery.autobean.shared.autobean;
public class testcategory { public static string asstring(autobean<test> instance) { return "as string"; } }
and test interface.
public interface test { string getvalue(); void setvalue(string value); string asstring(); }
all 3 in same package.
when i'm trying compile gwt project following error message
[java] resolving com.mycompany.my_gwt_project.client.test.testfactory [java] found type 'com.mycompany.my_gwt_project.client.test.testfactory' [java] [error] annotation error: cannot resolve com.mycompany.my_gwt_project.client.test.testcategory [java] java.lang.classnotfoundexception: com.mycompany.my_gwt_project.client.test.testcategory [java] @ java.net.urlclassloader$1.run(urlclassloader.java:202) [java] @ java.security.accesscontroller.doprivileged(native method) [java] @ java.net.urlclassloader.findclass(urlclassloader.java:190) [java] @ java.lang.classloader.loadclass(classloader.java:306) [java] @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) [java] @ java.lang.classloader.loadclass(classloader.java:247) [java] @ java.lang.class.forname0(native method) [java] @ java.lang.class.forname(class.java:249) [java] @ com.google.gwt.dev.javac.typeoraclemediator.resolveannotationvalue(typeoraclemediator.java:750) [java] @ com.google.gwt.dev.javac.typeoraclemediator.resolveannotationvalue(typeoraclemediator.java:689) [java] @ com.google.gwt.dev.javac.typeoraclemediator.createannotation(typeoraclemediator.java:498) [java] @ com.google.gwt.dev.javac.typeoraclemediator.resolveannotation(typeoraclemediator.java:648) [java] @ com.google.gwt.dev.javac.typeoraclemediator.resolveannotations(typeoraclemediator.java:663) [java] @ com.google.gwt.dev.javac.typeoraclemediator.resolveclass(typeoraclemediator.java:809) [java] @ com.google.gwt.dev.javac.typeoraclemediator.addnewtypes(typeoraclemediator.java:439) [java] @ com.google.gwt.dev.javac.typeoraclemediatorfromsource.addnewunits(typeoraclemediatorfromsource.java:52) [java] @ com.google.gwt.dev.javac.compilationstate.assimilateunits(compilationstate.java:164) [java] @ com.google.gwt.dev.javac.compilationstate.<init>(compilationstate.java:82) [java] @ com.google.gwt.dev.javac.compilationstatebuilder.dobuildfrom(compilationstatebuilder.java:466) [java] @ com.google.gwt.dev.javac.compilationstatebuilder.buildfrom(compilationstatebuilder.java:388) [java] @ com.google.gwt.dev.cfg.moduledef.getcompilationstate(moduledef.java:373) [java] @ com.google.gwt.dev.precompile.precompile(precompile.java:246) [java] @ com.google.gwt.dev.precompile.precompile(precompile.java:229) [java] @ com.google.gwt.dev.precompile.precompile(precompile.java:141) [java] @ com.google.gwt.dev.compiler.run(compiler.java:232) [java] @ com.google.gwt.dev.compiler.run(compiler.java:198) [java] @ com.google.gwt.dev.compiler$1.run(compiler.java:170) [java] @ com.google.gwt.dev.compiletaskrunner.dorun(compiletaskrunner.java:88) [java] @ com.google.gwt.dev.compiletaskrunner.runwithappropriatelogger(compiletaskrunner.java:82) [java] @ com.google.gwt.dev.compiler.main(compiler.java:177) [java] [error] annotation error: expected class java.lang.class, got null
does has clues?
you have javac
classes , include them in classpath of devmode.
this unfortunately known limitation of current design of gwt: https://code.google.com/p/google-web-toolkit/issues/detail?id=7602
Comments
Post a Comment