When I invoke the SAP JCo Adapter, I'm getting an error message like this:
Invocation of procedure 'invokeSAPFunction' caused java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Exception [project DemoProject].
What can cause it?
function invokeSAPFunction(params) {
var input = {};
input.FunctionName = params.FunctionName || "";
input.Imports = params.Imports || {};
return WL.Server.invokeSAPFunction(input);
}
I'm passing parameter as a JSON object i.e.
{"FunctionName" : "Example BAPI function ", "Imports" : {"COMPANYID":"ID"}}
Here function name is my BAPI which is created in SAP system
<?xml version="1.0" encoding="UTF-8"?>
<wl:adapter name="SAPJCoExample"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wl="http://www.ibm.com/mfp/integration"
xmlns:sapjco="http://www.ibm.com/mfp/integration/sap">
<displayName>SAPJCoExample</displayName>
<description>SAPJCoExample</description>
<connectivity>
<connectionPolicy xsi:type="sapjco:JCOConnectionPolicy"
jcoClientClient="800"
jcoClientUser="USERNAME"
jcoClientPasswd="PASSWORD"
jcoClientLang="EN"
jcoClientAsHost="hostname"
jcoClientSysnr="00"
maxConnections="10" />
</connectivity>
<procedure name="invokeSAPFunction"/>
</wl:adapter>