cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.ClassCastException in WD Components

luciano_leitedasilva
Contributor
0 Kudos

Hi evebody,

I facing with a very stranger situation in my WD Component. I have two components, A and B. The component B uses some methods of the Component A, but when I invoke these methods I getting the following exception:

java.lang.ClassCastException

at net.weg.cs.astec.srvorder.wdp.InternalMaterialOVSCustomController.wdGetConfigurationCompInstInterface(InternalMaterialOVSCustomController.java:226)

at net.weg.cs.astec.srvorder.MaterialOVSCustomController$OVSMaterialContextNotificationListener.onQuery(MaterialOVSCustomController.java:204)

at com.sap.tc.webdynpro.progmodel.valuehelp.OVSCMIQuery.onQuery(OVSCMIQuery.java:159)

at com.sap.tc.webdynpro.components.ovs.OVSComponent.query(OVSComponent.java:209)

at com.sap.tc.webdynpro.components.ovs.wdp.InternalOVSComponent.query(InternalOVSComponent.java:170)

... 31 more

When I debug my code, I see where this happen:

/** outgoing controller usage to interface controller of component usage */

public net.weg.cs.astec.model.configuration.wdp.IExternalConfigurationCompInterface wdGetConfigurationCompInstInterface() {

return

(net.weg.cs.astec.model.configuration.wdp.IExternalConfigurationCompInterface)

wdAlterEgo

.getComponentGCI()

.getComponentUsage("ConfigurationCompInst")

.getInterfaceController();

}

The method wdAlterEgo.getComponentGCI().getComponentUsage("ConfigurationCompInst").getInterfaceController() return a different type then the expected. Should return net.weg.cs.astec.model.configuration.wdp.IExternalConfigurationCompInterface but is returning net.weg.cs.astec.model.configuration.wdp.IInternalConfigurationCompInterface

Does anybody knows why this happening?

Thanks,

Luciano

View Entire Topic
siarhei_pisarenka3
Active Contributor
0 Kudos

How did you embed A in B?

BR, Sergei

luciano_leitedasilva
Contributor
0 Kudos

Yes, I did.

siarhei_pisarenka3
Active Contributor
0 Kudos

I mean how are you creating the A instance in A? Is it created automatically by Webdynpro (On Demand mode). Or are you creating A manually in code (Manual mode)?

BR , Sergei

luciano_leitedasilva
Contributor
0 Kudos

Hi,

I embeded on the "On Demand mode". It was working yesterday. If I deploy of the component A by as DC it stop to work. If I deploy by application it works. I have no idea why it is happening!

Thank you!