Skip to Content
0
Former Member
Jan 13, 2004 at 12:23 PM

ClassCastException while calling the supply function of a TreeUIElement

34 Views

Hi,

during the call of the supply function of a TreeUIElement I get a ClassCastException

at runtime. The call of the supply function in "ChooseProduct.java" comes from the generated class "InternalChooseProduct" (see stacktrace below) and the code there is:

protected void doSupplyElements() {

// call app defined supply function

InternalChooseProduct.this.supplySoftwareTree(this, (IContextElement)getParentElement());

}

so the cast (IContextElement)... goes wrong. I exactly followed the TreeUI example in the

onlinehelp tool in "Code Example for Using a Recursive Node", so I think it must be an internal

problem of the generation of code.

Please help me... - Thorsten

Error stacktrace:

com.sap.tc.webdynpro.services.cal.core.exceptions.ClientRuntimeException: com.dpwn.its.lm.sw.wdp.InternalChooseProduct$SoftwareTreeElement

at com.sap.tc.webdynpro.clientimpl.csf.client.CSFClient.sendResponse(CSFClient.java:479)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:544)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:48)

at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:205)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:114)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:80)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:43)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runSerlvet(HttpHandlerImpl.java:262)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:92)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:300)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:279)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:626)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:199)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:90)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:163)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:60)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:56)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:82)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:139)

-

-


caused by -

-


com.sap.tc.webdynpro.services.cal.core.exceptions.ClientRuntimeException: com.dpwn.its.lm.sw.wdp.InternalChooseProduct$SoftwareTreeElement

at com.sap.tc.webdynpro.clientimpl.csf.client.CSFUpdateClientPeer.sendResponse(CSFUpdateClientPeer.java:178)

at com.sap.tc.webdynpro.clientimpl.csf.client.CSFClient.sendResponse(CSFClient.java:476)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:544)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:48)

at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:205)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:114)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:80)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:43)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runSerlvet(HttpHandlerImpl.java:262)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:92)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:300)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:279)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:626)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:199)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:90)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:163)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:60)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:56)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:82)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:139)

-

-


caused by -

-


java.lang.ClassCastException: com.dpwn.its.lm.sw.wdp.InternalChooseProduct$SoftwareTreeElement

at com.dpwn.its.lm.sw.wdp.InternalChooseProduct$SoftwareTreeNode.doSupplyElements(InternalChooseProduct.java:328)

at com.sap.tc.webdynpro.progmodel.context.Node.supplyElements(Node.java:346)

at com.sap.tc.webdynpro.progmodel.context.Node.getElements(Node.java:310)

at com.sap.tc.webdynpro.progmodel.context.Node.size(Node.java:622)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:591)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:895)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:673)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeOrElements(DataContainerRenderer.java:542)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeInfo(DataContainerRenderer.java:259)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeInfo(DataContainerRenderer.java:282)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitNodeInfo(DataContainerRenderer.java:282)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitContext(DataContainerRenderer.java:184)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.visitDataContainer(DataContainerRenderer.java:129)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.data.DataContainerRenderer.render(DataContainerRenderer.java:94)

at com.sap.tc.webdynpro.clientserver.renderer.AbstractRenderManager.render(AbstractRenderManager.java:48)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.core.CSFResponseRenderer.renderDataContainerUpdates(CSFResponseRenderer.java:634)

at com.sap.tc.webdynpro.clientimpl.csf.renderer.core.CSFResponseRenderer.renderUserInterfaceUpdates(CSFResponseRenderer.java:990)

at com.sap.tc.webdynpro.clientimpl.http.client.AbstractUpdateClientPeer.sendResponse(AbstractUpdateClientPeer.java:152)

at com.sap.tc.webdynpro.clientimpl.csf.client.CSFUpdateClientPeer.sendResponse(CSFUpdateClientPeer.java:172)

at com.sap.tc.webdynpro.clientimpl.csf.client.CSFClient.sendResponse(CSFClient.java:476)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:544)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:48)

at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:205)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:114)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:80)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:43)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runSerlvet(HttpHandlerImpl.java:262)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:92)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:300)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:279)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:626)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:199)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:90)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:163)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:60)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:56)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:82)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:139)