Этот код хорошо работает в режиме разработки, но завершается неудачно с исключением при компиляции gwt. Я не знаю почему. Класс MechanicCategory находится на пути, хорошо компилируется с eclipse и все хорошо работает в режиме разработки, но не компилируется gwt ...: - / Любая идея?
public interface Entity<K> {
public K getId();
public void setId(K value);
}
public interface Mechanic extends Entity<Integer> {
List<UsualBase> getUsualBases();
boolean performCalculation(Date date);
}
@Category(MechanicCategory.class)
public interface BeanFactory extends AutoBeanFactory {
BeanFactory INSTANCE = GWT.create(BeanFactory.class);
AutoBean<Mechanic> mechanic();
}
public class MechanicCategory {
public static boolean performCalculation(AutoBean<Mechanic> instance, Date date) {
return false;
}
}
[java] Compiling module es.company.product.loader.Loader
[java] Resolving es.company.product.commons.client.beans.BeanFactory
[java] Found type 'es.company.product.commons.client.beans.BeanFactory'
[java] [ERROR] Annotation error: cannot resolve es.company.product.commons.client.beans.categories.MechanicCategory
[java] java.lang.ClassNotFoundException: es.company.product.commons.client.beans.categories.MechanicCategory
[java] at java.net.URLClassLoader$1.run(Unknown Source)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClass(Unknown Source)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[java] at java.lang.ClassLoader.loadClass(Unknown Source)
[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Unknown Source)
[java] at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue(TypeOracleMediator.java:750)
[java] at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotationValue(TypeOracleMediator.java:689)
[java] at com.google.gwt.dev.javac.TypeOracleMediator.createAnnotation(TypeOracleMediator.java:498)
[java] at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:648)
[java] at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:663)
[java] at com.google.gwt.dev.javac.TypeOracleMediator.resolveClass(TypeOracleMediator.java:809)
[java] at com.google.gwt.dev.javac.TypeOracleMediator.addNewTypes(TypeOracleMediator.java:439)
[java] at com.google.gwt.dev.javac.TypeOracleMediatorFromSource.addNewUnits(TypeOracleMediatorFromSource.java:52)
[java] at com.google.gwt.dev.javac.CompilationState.assimilateUnits(CompilationState.java:164)
[java] at com.google.gwt.dev.javac.CompilationState.<init>(CompilationState.java:82)
[java] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:450)
[java] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:370)
[java] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:360)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:252)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[java] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[java] [ERROR] Annotation error: expected class java.lang.Class, got null