Skip to Content
0
Former Member
Dec 09, 2006 at 08:01 AM

Executing RFC in java project :Getting Exception

56 Views

Hi all,

I am trying to call RFC from a java project.

The following is my code

public class RootClass {

public static void main(String[] args)throws ApplicationFaultException, SystemFaultException

{

JCO.Client jcoclient =JCO.createClient ("500","user","pwd","en","IPADDress","TKD","SPACE");

jcoclient.connect();

Zget_Espn_Details_Input input=new Zget_Espn_Details_Input();

input.setEspn("0000000276");

MyRFC_PortType port=new MyRFC_PortType();

port.messageSpecifier.setJcoClient(jcoclient);

Zget_Espn_Details_Output output=port.zget_Espn_Details(input);

}

I am getting the following exception

java.lang.NoClassDefFoundError: com/sap/mdi/ObjectFactoryException

at com.sap.aii.proxy.framework.core.AbstractProxy$JcoProxyHelper.send(AbstractProxy.java:173)

at com.sap.aii.proxy.framework.core.AbstractProxy.send$(AbstractProxy.java:141)

at mypackage.model.MyRFC_PortType.zget_Espn_Details(MyRFC_PortType.java:27)

at mypackage.javacode.RootClass.main(RootClass.java:93)

Exception in thread "main"

Does anybody knows the solution

Thanks

Fahad Hamsa