2 Replies Latest reply on Jul 23, 2013 6:53 AM by Saif Rehman

    Errai JPA Not working

    Saif Rehman Newbie

      Hi All,

      I am using errai 2.3.2.Final . I need to use ErraiJPA in my project but I am having the following exception while running the app .

       

      00:07:14.729 [ERROR] Generator 'org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator' threw an exception while rebinding 'org.jboss.errai.jpa.client.local.ErraiEntityManager' 

      java.lang.RuntimeException: error generating method call for: addAttribute([org.jboss.errai.codegen.SnapshotMaker$2@452d607f])
           at org.jboss.errai.codegen.builder.callstack.MethodCall.handleCall(MethodCall.java:121)
           at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.nextOrReturn(AbstractCallElement.java:46)
           at org.jboss.errai.codegen.builder.callstack.LoadVariable.handleCall(LoadVariable.java:122)
           at org.jboss.errai.codegen.builder.impl.AbstractStatementBuilder.generate(AbstractStatementBuilder.java:61)
           at org.jboss.errai.codegen.BlockStatement.generate(BlockStatement.java:81)
           at org.jboss.errai.codegen.meta.impl.build.BuildMetaMethod.toJavaString(BuildMetaMethod.java:344)
           at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.membersToString(BuildMetaClass.java:768)
           at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.toJavaString(BuildMetaClass.java:664)
           at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.toJavaString(BuildMetaClass.java:564)
           at org.jboss.errai.codegen.builder.impl.ClassBuilder.toJavaString(ClassBuilder.java:495)
           at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.generateEntityManagerClass(ErraiEntityManagerGenerator.java:181)
           at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.generate(ErraiEntityManagerGenerator.java:120)
           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:647)
           at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
           at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
           at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
           at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141)
           at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:585)
           at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455)
           at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
           at com.google.gwt.core.client.GWT.create(GWT.java:97)
           at org.jboss.errai.jpa.client.local.ErraiEntityManagerProvider.get(ErraiEntityManagerProvider.java:24)
           at org.jboss.errai.ioc.client.BootstrapperImpl$53.getInstance(BootstrapperImpl.java:1230)
           at org.jboss.errai.ioc.client.BootstrapperImpl$53.getInstance(BootstrapperImpl.java:1)
           at org.jboss.errai.ioc.client.container.IOCDependentBean.getInstance(IOCDependentBean.java:90)
           at org.jboss.errai.ioc.client.container.IOCDependentBean.getInstance(IOCDependentBean.java:81)
           at org.jboss.errai.ui.nav.client.local.spi.GeneratedNavigationGraph$16.content(GeneratedNavigationGraph.java:477)
           at org.jboss.errai.ui.nav.client.local.spi.GeneratedNavigationGraph$16.content(GeneratedNavigationGraph.java:1)
           at org.jboss.errai.ui.nav.client.local.Navigation.show(Navigation.java:115)
           at org.jboss.errai.ui.nav.client.local.Navigation.goTo(Navigation.java:75)
           at org.jboss.errai.ui.nav.client.local.TransitionTo.go(TransitionTo.java:69)
           at app.client.local.StrategiesTable.goToStrategy(StrategiesTable.java:235)
           at app.client.local.StrategiesTable$3.f(StrategiesTable.java:199)
           at com.google.gwt.query.client.Function.f(Function.java:217)
           at com.google.gwt.query.client.Function.fe(Function.java:323)
           at com.google.gwt.query.client.plugins.events.EventsListener$BindFunction.fire(EventsListener.java:143)
           at com.google.gwt.query.client.plugins.events.EventsListener.dispatchEvent(EventsListener.java:559)
           at com.google.gwt.query.client.plugins.events.EventsListener.onBrowserEvent(EventsListener.java:643)
           at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351)
           at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307)
           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.MethodAdaptor.invoke(MethodAdaptor.java:103)
           at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
           at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
           at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
           at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
           at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
           at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
           at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
           at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
           at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
           at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
           at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
           at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
           at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
           at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
           at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
           at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
           at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.ClassCastException: org.jboss.errai.codegen.meta.impl.gwt.GWTTypeVariable cannot be cast to org.jboss.errai.codegen.meta.MetaClass
           at org.jboss.errai.codegen.meta.impl.AbstractMetaClass.getTypeParmsString(AbstractMetaClass.java:88)
           at org.jboss.errai.codegen.meta.impl.AbstractMetaClass.getFullyQualifiedNameWithTypeParms(AbstractMetaClass.java:67)
           at org.jboss.errai.codegen.meta.impl.AbstractMetaClass.toString(AbstractMetaClass.java:769)
           at java.lang.String.valueOf(String.java:2902)
           at java.lang.StringBuilder.append(StringBuilder.java:128)
           at org.jboss.errai.codegen.SnapshotMaker$2.generate(SnapshotMaker.java:308)
           at org.jboss.errai.codegen.builder.callstack.LoadNested$1.generate(LoadNested.java:39)
           at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.nextOrReturn(AbstractCallElement.java:41)
           at org.jboss.errai.codegen.builder.callstack.LoadNested.handleCall(LoadNested.java:76)
           at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.nextOrReturn(AbstractCallElement.java:46)
           at org.jboss.errai.codegen.builder.callstack.ResetCallElement.handleCall(ResetCallElement.java:29)
           at org.jboss.errai.codegen.builder.impl.AbstractStatementBuilder.generate(AbstractStatementBuilder.java:61)
           at org.jboss.errai.codegen.BlockStatement.generate(BlockStatement.java:81)
           at org.jboss.errai.codegen.builder.impl.AnonymousClassStructureBuilderImpl$2$1.doGenerate(AnonymousClassStructureBuilderImpl.java:111)
           at org.jboss.errai.codegen.builder.impl.AnonymousClassStructureBuilderImpl.doGenerate(AnonymousClassStructureBuilderImpl.java:186)
           at org.jboss.errai.codegen.builder.impl.AnonymousClassStructureBuilderImpl.access$200(AnonymousClassStructureBuilderImpl.java:43)
           at org.jboss.errai.codegen.builder.impl.AnonymousClassStructureBuilderImpl$3.generate(AnonymousClassStructureBuilderImpl.java:152)
           at org.jboss.errai.codegen.builder.impl.ObjectBuilder$2.doDeferred(ObjectBuilder.java:173)
           at org.jboss.errai.codegen.builder.callstack.DeferredCallElement.handleCall(DeferredCallElement.java:42)
           at org.jboss.errai.codegen.builder.impl.AbstractStatementBuilder.generate(AbstractStatementBuilder.java:61)
           at org.jboss.errai.codegen.builder.impl.ObjectBuilder.generate(ObjectBuilder.java:181)
           at org.jboss.errai.codegen.builder.impl.AbstractStatementBuilder.toJavaString(AbstractStatementBuilder.java:85)
           at org.jboss.errai.codegen.SnapshotMaker$2.generate(SnapshotMaker.java:378)
           at org.jboss.errai.codegen.util.GenUtil.generate(GenUtil.java:130)
           at org.jboss.errai.codegen.util.GenUtil.generateCallParameters(GenUtil.java:76)
           at org.jboss.errai.codegen.builder.callstack.MethodCall.handleCall(MethodCall.java:60)
           at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.nextOrReturn(AbstractCallElement.java:46)
           at org.jboss.errai.codegen.builder.callstack.LoadVariable.handleCall(LoadVariable.java:122)
           at org.jboss.errai.codegen.builder.impl.AbstractStatementBuilder.generate(AbstractStatementBuilder.java:61)
           at org.jboss.errai.codegen.BlockStatement.generate(BlockStatement.java:81)
           at org.jboss.errai.codegen.meta.impl.build.BuildMetaMethod.toJavaString(BuildMetaMethod.java:344)
           at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.membersToString(BuildMetaClass.java:768)
           at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.toJavaString(BuildMetaClass.java:664)
           at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.toJavaString(BuildMetaClass.java:564)
           at org.jboss.errai.codegen.builder.impl.ClassBuilder.toJavaString(ClassBuilder.java:495)
           at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.generateEntityManagerClass(ErraiEntityManagerGenerator.java:181)
           at org.jboss.errai.jpa.rebind.ErraiEntityManagerGenerator.generate(ErraiEntityManagerGenerator.java:120)
           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:647)
           at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
           at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
           at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
           at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141)
           at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:585)
           at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455)
           at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
           at com.google.gwt.core.client.GWT.create(GWT.java:97)
           at org.jboss.errai.jpa.client.local.ErraiEntityManagerProvider.get(ErraiEntityManagerProvider.java:24)
           at org.jboss.errai.ioc.client.BootstrapperImpl$53.getInstance(BootstrapperImpl.java:1230)
           at org.jboss.errai.ioc.client.BootstrapperImpl$53.getInstance(BootstrapperImpl.java:1)
           at org.jboss.errai.ioc.client.container.IOCDependentBean.getInstance(IOCDependentBean.java:90)
           at org.jboss.errai.ioc.client.container.IOCDependentBean.getInstance(IOCDependentBean.java:81)
           at org.jboss.errai.ui.nav.client.local.spi.GeneratedNavigationGraph$16.content(GeneratedNavigationGraph.java:477)
           at org.jboss.errai.ui.nav.client.local.spi.GeneratedNavigationGraph$16.content(GeneratedNavigationGraph.java:1)
           at org.jboss.errai.ui.nav.client.local.Navigation.show(Navigation.java:115)
           at org.jboss.errai.ui.nav.client.local.Navigation.goTo(Navigation.java:75)
           at org.jboss.errai.ui.nav.client.local.TransitionTo.go(TransitionTo.java:69)
           at app.client.local.StrategiesTable.goToStrategy(StrategiesTable.java:235)
           at app.client.local.StrategiesTable$3.f(StrategiesTable.java:199)
           at com.google.gwt.query.client.Function.f(Function.java:217)
           at com.google.gwt.query.client.Function.fe(Function.java:323)
           at com.google.gwt.query.client.plugins.events.EventsListener$BindFunction.fire(EventsListener.java:143)
           at com.google.gwt.query.client.plugins.events.EventsListener.dispatchEvent(EventsListener.java:559)
           at com.google.gwt.query.client.plugins.events.EventsListener.onBrowserEvent(EventsListener.java:643)
           at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351)
           at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307)
           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.MethodAdaptor.invoke(MethodAdaptor.java:103)
           at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
           at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
           at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
           at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
           at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
           at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
           at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
           at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
           at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
           at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
           at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
           at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
           at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
           at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
           at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
           at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
           at java.lang.Thread.run(Thread.java:722)

      Hope the above information can help. Please let me know if you want any other details

      Thanks!