on 12-02-2005 12:55 AM
Hi,
Can anyone please tell me why one would get this exception? (Below is just a small snippet).
java.lang.ClassCastException
at com.sap.tc.webdynpro.progmodel.context.Paths.getAttributeInfoFor(Paths.java:202)
at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.DropDownByKeyAdapter.setViewAndNodeElement(DropDownByKeyAdapter.java:240)
at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:231)
at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:64)
at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.LabelAdapter.getLabeledControlName(LabelAdapter.java:283)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.LabelRenderer.render(LabelRenderer.java:70)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:285)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:97
Thanks
KG
Hi Kunal
Try removing all the imports and organize them again one by one by selecting the appropriate imports.
ClassCastException generally occurs due to unappropriate imports.I have faced a similar problem before. After doing this, if u still have the problem, reply me.
Regards
Vijayakhanna Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kunal-
Can you make sure that the DataSource is still referenced in the table. You might have removed the reference to the DataSource in the view by mistake.
Please let me know if this solves this issue for you.
Hope this helps,
- Vik.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kunal
Can u post ur code? The datasource connection should be like this.
try{
InitialContext ctx=new InitialContext();
DataSource ds=(DataSource)ctx.lookup("jdbc/SAPJ2EDB");
Connection con=ds.getConnection();
Statement stmt=con.createStatement();
}catch(Exception e){
wdComponentAPI.getMessageManager().reportSuccess("",+e);
}
Regards
Vijayakhanna Raman
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.