Estou tentando usar GWT-ENT e tenho o seguinte método:
public void create(FormTest test) {
FormTest form = null;
try {
ClassType classType = TypeOracle.Instance.getClassType(test.getClass());
Constructor constructor = classType.findConstructor();
form = (FormTest) constructor.newInstance();
} catch (Exception e) {
e.printStackTrace();
}
}
classe do código acima:
@Reflectable
public class FormTest extends FormPanel {
public FormTeste() {
setTitle("Reflection");
add(new Label("test"));
}
}
erro ao executar o método:
> 00:00:04,318 [ERROR] Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected at com.gwtent.gen.reflection.GenExclusionCompositeReflection$1.exclude(GenExclusionCompositeReflection.java:40) at com.gwtent.gen.GenExclusionCompositeImpl.exclude(GenExclusionCompositeImpl.java:37) at com.gwtent.gen.LogableSourceCreator.genExclusion(LogableSourceCreator.java:92) at com.gwtent.gen.LogableSourceCreator.generate(LogableSourceCreator.java:105) at com.gwtent.gen.reflection.Reflection__ProxyGenerator.generate(Reflection__ProxyGenerator.java:33) at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40) at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:657) at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41) at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79) at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276) at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141) at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) at com.google.gwt.core.shared.GWT.create(GWT.java:57) at com.google.gwt.core.client.GWT.create(GWT.java:85) at com.gwtent.reflection.client.TypeOracle.(TypeOracle.java:24) at br.reflexao.client.Modulo.criarJava(Modulo.java:22) at br.reflexao.client.Reflexao.onModuleLoad(Reflexao.java:9) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:722)
Estou usando maven, instalei manualmente as depenências relacionadas
ao GWT, segue abaixo:
2.5.0 1.6 1.6 com.gwtent gwtent-orm 2.0RC1 jar com.google.gwt gwt-servlet ${gwtVersion} runtime com.google.gwt gwt-user ${gwtVersion} provided com.google.gwt gwt-dev ${gwtVersion} test
Estou usando maven 3.0.4, oracle jdk 7.0 Windows 7 32-bits,
o projeto foi criado com o seguinte comando:
webAppCreator-noant-maven-XnoEclipse-out test-gwt com.testGwt.Test
As dúvidas são: está faltando alguma dependência?
a versão 2.5 não é compatível com GWT-ENT?
exite alguma alternativa para GWT-ENT?
O ideal seria resolver o problema sem mudar as bibliotecas.
Desde já agradeço!