{"record":{"id":"69109de714ae9c9d","repo":"theonedev/onedev","slug":"has-not-been-properly-added-something-in-the-hie","errorCode":null,"errorMessage":" has not been properly added. Something in the hierarchy of ","messagePattern":" has not been properly added\\. Something in the hierarchy of ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/org/apache/wicket/Component.java","lineNumber":902,"sourceCode":"\t\t\t\tif (!getRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED))\n\t\t\t\t{\n\t\t\t\t\tthrow new IllegalStateException(Component.class.getName() +\n\t\t\t\t\t\t\" has not been properly initialized. Something in the hierarchy of \" +\n\t\t\t\t\t\tgetClass().getName() +\n\t\t\t\t\t\t\" has not called super.onInitialize() in the override of onInitialize() method\");\n\t\t\t\t}\n\t\t\t\tsetRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED, false);\n\t\n\t\t\t\tgetApplication().getComponentInitializationListeners().onInitialize(this);\n\t\t\t}\n\t\t\telse if (getFlag(FLAG_REMOVED))\n\t\t\t{\n\t\t\t\tsetFlag(FLAG_REMOVED, false);\n\t\t\t\tsetRequestFlag(RFLAG_ON_RE_ADD_SUPER_CALL_VERIFIED, false);\n\t\t\t\tonReAdd();\n\t\t\t\tif (!getRequestFlag(RFLAG_ON_RE_ADD_SUPER_CALL_VERIFIED))\n\t\t\t\t{\n\t\t\t\t\tthrow new IllegalStateException(Component.class.getName() +\n\t\t\t\t\t\t\t\" has not been properly added. Something in the hierarchy of \" +\n\t\t\t\t\t\t\tgetClass().getName() +\n\t\t\t\t\t\t\t\" has not called super.onReAdd() in the override of onReAdd() method\");\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tHierarchicalContext.pop();\n\t\t}\n\t}\n\n\t/**\n\t * Called on every component after the page is rendered. It will call onAfterRender for it self\n\t * and its children.\n\t */\n\tpublic final void afterRender()\n\t{\n\t\ttry\n\t\t{","sourceCodeStart":884,"sourceCodeEnd":920,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/org/apache/wicket/Component.java#L884-L920","documentation":"When a component that was removed is added back to a page, Component calls onReAdd() and then checks RFLAG_ON_RE_ADD_SUPER_CALL_VERIFIED. The flag is set inside Component.onReAdd(); if an override in the class hierarchy fails to call super.onReAdd(), Wicket throws this IllegalStateException to signal the lifecycle contract was violated.","triggerScenarios":"A component hierarchy override of onReAdd() does not call super.onReAdd(), and the component is re-added to its parent after having been removed.","commonSituations":"Custom containers that remove and re-add children dynamically; overridden onReAdd copied from code predating Wicket's super-call verification.","solutions":["Locate the onReAdd() override in the class named in the message or its parents","Call super.onReAdd() inside the override","Avoid removing/re-adding components if not needed; replace child instead"],"exampleFix":"// before\n@Override\nprotected void onReAdd() {\n    configure();\n}\n// after\n@Override\nprotected void onReAdd() {\n    super.onReAdd();\n    configure();\n}","handlingStrategy":"validation","validationCode":"@Override\nprotected void onReAdd() {\n    assertHasSuperCall(super::onReAdd); // or simply always call super first\n    super.onReAdd();\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Call super.onReAdd() first in any override","Prefer replacing children over remove/re-add cycles"],"tags":["wicket","lifecycle","component-hierarchy"],"backgroundTag":"method-not-implemented","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}