Skip to Content
0
Former Member
Mar 29, 2013 at 10:06 PM

Class Cast Exception in UI Module using Module Access of custom Module

32 Views

Hello WCEM Champs,

I am trying to Embed General Contact Views from User Module to my Custom Module

with

<wcf:moduleInterface id="contact" name="com.sap.user.ContactViews" viewComponent="contactGeneralData" componentData="#{cc.vch.contactGeneralData}"/>

in my Custom View.

For View Handler in ui Repository as per extention Guide

<ViewComponent name="myContactInfoView" componentHandlerClassName="com.xxx.wec.app.comm.module.xxx.ui.handler.impl.ExampleVCHandlerImpl "/>

public class ExampleVCHandlerImpl extends ViewComponentHandlerBaseImpl<MyModuleAccess> implements BpContentVCHandler,UIProcessStepHandler {

public MyModuleAccess myModuleAccess =null;

@BuildTime

public void prepareData(){

// get the module access of my module

myModuleAccess = this.getModuleAccess(); <============== Class Cast Exception here ?????

}

MyModuleAccess is created as per standard & similarly dependency is maintained.

Which Throw me error

Caused by: java.lang.ClassCastException: class com.sap.wec.tc.core.modulemgmt.ModuleAccess:sap.com/wec~frw~tc~core~app@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@3175fda4@alive incompatible with interface com.xxx.wec.app.comm.module.ebpp.modulemgmt.interf.MyModuleAccess:xxx.xx/cdev~xxxwec~invoices~dpu@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@17f98e42@alive

at com.xxx.wec.app.comm.module.xxx.ui.handler.impl.ExampleVCHandlerImpl.prepareData(ExampleVCHandlerImpl.java:43)

I Have Gone through this Post

Inter module reference ClassCastException on WCEM2.0

but it didnt help me much .

Waiting for help

Thanks in Advance

Ravi