Detail
Fehlerbehebung
Wichtig
Fehlerbehebung
java.lang.ClassCastException: class com.top_logic.basic.util.ResKey$LiteralKey cannot be cast to class java.lang.String (com.top_logic.basic.util.ResKey$LiteralKey is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap') at com.top_logic.knowledge.wrap.AbstractWrapper.getString(AbstractWrapper.java:583) at com.top_logic.element.core.wrap.WrapperTLElement.getName(WrapperTLElement.java:37) at com.top_logic.knowledge.gui.WrapperResourceProvider.getLabel(WrapperResourceProvider.java:69) at com.top_logic.layout.provider.AbstractDispatchingResourceProvider.getLabel(AbstractDispatchingResourceProvider.java:25) at com.top_logic.layout.provider.AbstractMappingResourceProviderBase.getLabel(AbstractMappingResourceProviderBase.java:72) at com.top_logic.mig.html.HTMLUtil.writeDragImageContent(HTMLUtil.java:1355) at com.top_logic.mig.html.HTMLUtil.writeDragImage(HTMLUtil.java:1327) at com.top_logic.layout.tree.TreeRenderer.writeNodeAttributes(TreeRenderer.java:355) at com.top_logic.layout.tree.TreeRenderer.internalWriteNode(TreeRenderer.java:284) at com.top_logic.layout.tree.TreeRenderer$1.write(TreeRenderer.java:64) at com.top_logic.layout.tree.TreeRenderer$1.write(TreeRenderer.java:61) at com.top_logic.layout.basic.AbstractDisplayContext.renderScoped(AbstractDisplayContext.java:116) at com.top_logic.layout.tree.TreeRenderer.writeNode(TreeRenderer.java:262) at com.top_logic.layout.tree.TreeRenderer$3.write(TreeRenderer.java:462) at com.top_logic.base.services.simpleajax.DOMModification.writeChildrenAsXML(DOMModification.java:47) at com.top_logic.base.services.simpleajax.ClientAction.writeAsXML(ClientAction.java:130) at com.top_logic.layout.UpdateWriter.add(UpdateWriter.java:184) at com.top_logic.layout.tree.TreeRenderer.addNodeUpdateActions(TreeRenderer.java:386) at com.top_logic.layout.tree.TreeControl$1.visitNodeUpdate(TreeControl.java:418) at com.top_logic.layout.tree.TreeControl$1.visitNodeUpdate(TreeControl.java:412) at com.top_logic.layout.tree.TreeUpdateAccumulator$NodeUpdate.visit(TreeUpdateAccumulator.java:142) at com.top_logic.layout.tree.TreeControl.internalRevalidate(TreeControl.java:386) at com.top_logic.layout.basic.AbstractControlBase$InternalRevalidator.validate(AbstractControlBase.java:1127) at com.top_logic.layout.basic.AbstractControlBase$InternalRevalidator.validate(AbstractControlBase.java:1114) at com.top_logic.layout.basic.AbstractDisplayContext.validateScoped(AbstractDisplayContext.java:129) at com.top_logic.layout.basic.AbstractControlBase.revalidateControl(AbstractControlBase.java:616) at com.top_logic.layout.basic.AbstractControlBase.revalidate(AbstractControlBase.java:564) at com.top_logic.layout.LocalScope$LocalScopeValidator.validate(LocalScope.java:183) at com.top_logic.layout.LocalScope$LocalScopeValidator.validate(LocalScope.java:173) at com.top_logic.layout.basic.AbstractDisplayContext.validateScoped(AbstractDisplayContext.java:129)
Caused by: java.lang.ClassCastException: class com.top_logic.basic.util.ResKey$LiteralKey cannot be cast to class java.lang.String (com.top_logic.basic.util.ResKey$LiteralKey is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap') at com.top_logic.knowledge.wrap.AbstractWrapper.getString(AbstractWrapper.java:583) at com.top_logic.element.core.wrap.WrapperTLElement.getName(WrapperTLElement.java:37) at com.top_logic.knowledge.wrap.Wrapper.generateFullText(Wrapper.java:185) at com.top_logic.element.structured.wrap.AttributedStructuredElementWrapper.generateFullText(AttributedStructuredElementWrapper.java:114) at com.top_logic.knowledge.indexing.DefaultIndexingService$WrapperContentObject.getContent(DefaultIndexingService.java:462) at com.top_logic.knowledge.indexing.lucene.LuceneThread.getContent(LuceneThread.java:471)
Test
- com.top_logic.demo/src/test/java/test/com/top_logic/demo/scripted/model/attribute/TestI18NStructure.script.xml
- Klasse von StructuredElementContainer ableiten und ein i18N Attribut mit der id "name" definieren
- Instanzen anlegen und der Wert korrekt eingegeben
- Anzeige prüfen.