Vinod Kumar Marupu
Vinod Kumar Marupu

Reputation: 547

Error when invoking IBM Mobilefirst 7.0-SAP JCo Adapter

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>

Upvotes: 2

Views: 144

Answers (2)

Kyle Woodward
Kyle Woodward

Reputation: 46

Like Chris Jaun mentioned, this is an error that you'll receive if you haven't setup your machine correctly to work with JCo Adapters. Make sure the following criteria is met with your current setup:

  1. The jre directory should be your java runtime environment

  2. your jre must be 32-bit to work with the jco jar and dlls (in my experience, I've only gotten the adapters to work with the 32-bit version)

  3. librfc32.dll is in C:/Windows/System32

  4. sapjco-*.*.*.jar is in \jre\lib\ext

  5. sapjcorfc.dll is in \jre\bin

Upvotes: 1

chrisjaun
chrisjaun

Reputation: 81

That error indicates that you have not installed the SAP JCO libraries correctly on your MFP server.

Upvotes: 1

Related Questions