@ApplicationScoped failures in Errai 3.1.2
hr.stoyanov May 18, 2015 12:31 AMhello all,
I noticed that this configuration of beans fails:
....
@ApplicationScoped @Templated("BottomBar.html#bottomBar")
public class BottomBar extends Composite {
...
}
@ApplicationScoped @Page(path = "faq") @Templated("FAQ.html#faq")
public class FAQPage extends AbstractTextPage {
@Inject @DataField private BottomBar bottomBar;
}
It looks like Errai 3.1.2 can not instantiate the application-scoped beans in the right order? If I remove @ApplicationScoped from BottomBar, all works fine. Is this a known issue or limitation?
Here are stack some traces:
=====================================
21:26:30 SEVERE [AbstractCreationalContext] error initializing bean: com.xxx.gwt.client.local.help.HelpPage
Uncaught java.lang.RuntimeException: critical error in IOC container bootstrap: java.lang.RuntimeException: error in bean initialization
21:26:31 SEVERE [AbstractCreationalContext] error initializing bean: com.xxx.gwt.client.local.picks.PicksPage
Got invalid page name "PicksPage". Redirecting to default page.
java.lang.RuntimeException: error in bean initialization
at fillInStackTrace_0_g$
at Throwable_3_g$
at Exception_3_g$
at RuntimeException_3_g$
at fireAllInitCallbacks_0_g$
at finish_3_g$
at getInstance_174_g$
at getInstance_178_g$
at produceContent_0_g$
at maybeShowPage_0_g$
at navigate_0_g$
at onValueChange_8_g$
at dispatch_79_g$
at dispatch_80_g$
at dispatch_0_g$
at dispatchEvent_2_g$
at doFire_0_g$
at fireEvent_2_g$
at fireEvent_1_g$
at fireEvent_3_g$
at fire_10_g$
at fireValueChangedEvent_0_g$
at fireCurrentHistoryState_0_g$
at fireCurrentHistoryState_1_g$
at run_44_g$
at run_29_g$
at _runAllRunnables_1_g$
at _runAllRunnables_0_g$
at finishInit_0_g$
at run_27_g$
at run_30_g$
at run_31_g$
at fire_0_g$
at anonymous
at apply_43_g$
at entry0_0_g$
at anonymous
Caused by: java.lang.IllegalStateException: Cannot set a new parent without first clearing the old parent
at fillInStackTrace_0_g$
at Throwable_2_g$
at Exception_2_g$
at RuntimeException_2_g$
at IllegalStateException_2_g$
at setParent_2_g$
at setParentNative_0_g$
at TemplateWidget_1_g$
at initWidget_1_g$
at init_186_g$
at init_45_g$
at fireAllInitCallbacks_0_g$
at finish_3_g$
at getInstance_174_g$
at getInstance_178_g$
at produceContent_0_g$
at maybeShowPage_0_g$
at navigate_0_g$
at onValueChange_8_g$
at dispatch_79_g$
at dispatch_80_g$
at dispatch_0_g$
at dispatchEvent_2_g$
at doFire_0_g$
at fireEvent_2_g$
at fireEvent_1_g$
at fireEvent_3_g$
at fire_10_g$
at fireValueChangedEvent_0_g$
at fireCurrentHistoryState_0_g$
at fireCurrentHistoryState_1_g$
at run_44_g$
at run_29_g$
at _runAllRunnables_1_g$
at _runAllRunnables_0_g$
at finishInit_0_g$
at run_27_g$
at run_30_g$
at run_31_g$
at fire_0_g$
at anonymous
at apply_43_g$
at entry0_0_g$
at anonymous
Async Task Execution Failed. Future executions (if any) are cancelled.
com.google.gwt.event.shared.UmbrellaException: Exception caught: This UIObject's element is not set; you may be missing a call to either Composite.initWidget() or UIObject.setElement()
at fillInStackTrace_0_g$
at Throwable_3_g$
at Exception_3_g$
at RuntimeException_3_g$
at UmbrellaException_3_g$
at UmbrellaException_5_g$
at fireEvent_1_g$
at fireEvent_3_g$
at fire_10_g$
at fireValueChangedEvent_0_g$
at fireCurrentHistoryState_0_g$
at fireCurrentHistoryState_1_g$
at run_44_g$
at run_29_g$
at _runAllRunnables_1_g$
at _runAllRunnables_0_g$
at finishInit_0_g$
at run_27_g$
at run_30_g$
at run_31_g$
at fire_0_g$
at anonymous
at apply_43_g$
at entry0_0_g$
at anonymous
Caused by: java.lang.AssertionError: This UIObject's element is not set; you may be missing a call to either Composite.initWidget() or UIObject.setElement()
at fillInStackTrace_0_g$
at Throwable_3_g$
at Error_3_g$
at AssertionError_7_g$
at makeAssertionError_Object_0_g$
at getElement_3_g$
at setWidget_2_g$
at setWidget_1_g$
at setWidget_8_g$
at callback_52_g$
at callback_40_g$
at callback_39_g$
at getInstance_178_g$
at fireAsync_1_g$
at run_45_g$
at proceed_0_g$
at pageHiding_0_g$
at callback_50_g$
at callback_51_g$
at getInstance_178_g$
at produceContent_13_g$
at maybeShowPage_0_g$
at navigate_0_g$
at navigate_2_g$
at navigate_1_g$
at goTo_2_g$
at handleInvalidPageNameError_0_g$
at onValueChange_8_g$
at dispatch_79_g$
at dispatch_80_g$
at dispatch_0_g$
at dispatchEvent_2_g$
at doFire_0_g$
at fireEvent_2_g$
at fireEvent_1_g$
at fireEvent_3_g$
at fire_10_g$
at fireValueChangedEvent_0_g$
at fireCurrentHistoryState_0_g$
at fireCurrentHistoryState_1_g$
at run_44_g$
at run_29_g$
at _runAllRunnables_1_g$
at _runAllRunnables_0_g$
at finishInit_0_g$
at run_27_g$
at run_30_g$
at run_31_g$
at fire_0_g$
at anonymous
at apply_43_g$
at entry0_0_g$
at anonymous