Compiler failure in ERRAI 3.2.3-SNAPSHOT
hr.stoyanov Mar 4, 2016 6:32 PMCame across strange failure with the following piece of code related to client security. It seems related to @RestrictedAccess, since the issue goes away without it.
@DataField
@RestrictedAccess(roles = "basic")
private Element userNameItem = DOM.createSpan();
-----------------------------------------------
org.jboss.errai.codegen.exception.UndefinedMethodException: undefined method: getElement(); in class: com.google.gwt.dom.client.Element
at org.jboss.errai.codegen.builder.callstack.MethodCall.handleCall(MethodCall.java:73)
at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.nextOrReturn(AbstractCallElement.java:46)
at org.jboss.errai.codegen.builder.callstack.LoadNested.handleCall(LoadNested.java:76)
at org.jboss.errai.codegen.builder.impl.AbstractStatementBuilder.generate(AbstractStatementBuilder.java:61)
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:61)
at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.nextOrReturn(AbstractCallElement.java:46)
at org.jboss.errai.codegen.builder.callstack.MethodCall.handleCall(MethodCall.java:115)
at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.nextOrReturn(AbstractCallElement.java:46)
at org.jboss.errai.codegen.builder.callstack.LoadClassReference.handleCall(LoadClassReference.java:48)
at org.jboss.errai.codegen.builder.impl.AbstractStatementBuilder.generate(AbstractStatementBuilder.java:61)
at org.jboss.errai.codegen.BlockStatement.generate(BlockStatement.java:90)
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:175)
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:183)
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:61)
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:90)
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.erraen.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:175)
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:183)
at org.jboss.errai.codegen.builder.impl.FieldBuilder$1.generate(FieldBuilder.java:123)
at org.jboss.errai.codegen.meta.impl.build.BuildMetaField.toJavaString(BuildMetaField.java:218)
at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.membersToString(BuildMetaClass.java:744)
at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.toJavaString(BuildMetaClass.java:682)
at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.toJavaString(BuildMetaClass.java:582)
at org.jboss.errai.codegen.builder.impl.ClassBuilder.toJavaString(ClassBuilder.java:493)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:347)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:141)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:72)
at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:67)
at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:55)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Problem was caused by this call
at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.<init>(AbstractCallElement.java:33)
at org.jboss.errai.codegen.builder.callstack.MethodCall.<init>(MethodCall.java:46)
at org.jboss.errai.codegen.builder.impl.ContextualStatementBuilderImpl.invoke(ContextualStatementBuilderImpl.java:60)
Caused by: java.lang.RuntimeException: External call to API
at org.jboss.errai.ui.rebind.StyleBindingCodeDecorator.generateDecorator(StyleBindingCodeDecorator.java:113)
at org.jboss.errai.ioc.rebind.ioc.injector.api.DecoratorTask.doTask(DecoratorTask.java:103)
at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.handleInjectionTasks(InjectUtil.java:164)
at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.access$000(InjectUtil.java:73)
at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil$2.generateConstructor(InjectUtil.java:151)
at org.jboss.errai.ioc.rebind.ioc.injector.basic.TypeInjector.renderProvider(TypeInjector.java:138)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$4.handle(IOCConfigProcessor.java:420)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$7.process(IOCConfigProcessor.java:673)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor.process(IOCConfigProcessor.java:619)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:299)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:141)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:72)
at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:67)
at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:55)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPotor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
org.jboss.errai.codegen.exception.UndefinedMethodException: undefined method: addElementBinding(com.peruncs.s4g.web.gwt.client.local.HeaderMenu, com.sun.proxy.$
Proxy64, java.lang.Object); in class: org.jboss.errai.ui.shared.api.style.StyleBindingsRegistry
at org.jboss.errai.codegen.builder.callstack.MethodCall.handleCall(MethodCall.java:73)
at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.nextOrReturn(AbstractCallElement.java:46)
at org.jboss.errai.codegen.builder.callstack.MethodCall.handleCall(MethodCall.java:115)
at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.nextOrReturn(AbstractCallElement.java:46)
at org.jboss.errai.codegen.builder.callstack.LoadClassReference.handleCall(LoadClassReference.java:48)
at org.jboss.errai.codegen.builder.impl.AbstractStatementBuilder.generate(AbstractStatementBuilder.java:61)
at org.jboss.errai.codegen.BlockStatement.generate(BlockStatement.java:90)
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:175)
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:183)
at org.jboss.errai.codegen.util.GenUtil.generate(GenUtil.java:130)
at ss.errai.codegen.util.GenUtil.generateCallParameters(GenUtil.java:76)
at org.jboss.errai.codegen.builder.callstack.MethodCall.handleCall(MethodCall.java:61)
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:90)
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:175)
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:183)
at org.jboss.errai.codegen.builder.impl.FieldBuilder$1.generate(FieldBuilder.java:123)
at org.jboss.errai.codegen.meta.impl.build.BuildMetaField.toJavaString(BuildMetaField.java:218)
at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.membersToString(BuildMetaClass.java:744)
at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.toJavaString(BuildMetaClass.java:682)
at org.jboss.errai.codegen.meta.impl.build.BuildMetaClass.toJavaString(BuildMetaClass.java:582)
at org.jboss.errai.codegen.builder.impl.ClassBuilder.toJavaString(ClassBjava:493)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:347)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:141)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:72)
at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:67)
at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:55)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Problem was caused by this call
at org.jboss.errai.codegen.builder.callstack.AbstractCallElement.<init>(AbstractCallElement.java:33)
at org.jboss.errai.codegen.builder.callstack.MethodCall.<init>(MethodCall.java:46)
at org.jboss.errai.codegen.builder.impl.ContextualStatementBuilderImpl.invoke(ContextualStatementBuilderImpl.java:60)
Caused by: java.lang.RuntimeException: External call to API
at org.jboss.errai.ui.rebind.StyleBindingCodeDecorator.generateDecorator(StyleBindingCodeDecorator.java:113)
at org.jboss.errai.ioc.rebind.ioc.injector.api.DecoratorTask.doTask(DecoratorTask.java:103)
at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.handleInjectionTasks(InjectUtil.java:164)
at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.access$000(InjectUtil.java:73)
at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil$2.generateConstructor(InjectUtil.java:151)
at org.jboss.errai.ioc.rebind.ioc.injector.basic.TypeInjector.renderProvider(TypeInjector.java:138)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$4.handle(IOCConfigProcessor.java:420)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$7.process(IOCCocessor.java:673)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor.process(IOCConfigProcessor.java:619)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:299)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:141)
at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:72)
at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:67)
at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:55)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Compiling module com.peruncs.s4g.web.gwt.S4GWebAppDev