Skip to Content
0
Former Member
Jul 28, 2005 at 11:46 AM

JCO Connectivity issue

45 Views

Hi All,

I'm building a Java Application to connect to SAP. However I'm unable to connect with the JCo. I have checked and ensured that all libraries are in the required paths as per the installation & configuration

manual.I am also able to log in SAP using the SAP GUI.

This is the java code that I have written:

import com.sap.mw.jco.*;

public class Connection1 {

public static void main(String[] args) {

JCO.Client mConnection;

mConnection = JCO.createClient

("100", "****", "****", "EN", "10.191.126.68", "00");

try {

mConnection.connect();

}

catch (Exception ex)

{

ex.printStackTrace();

System.exit(1);

}

mConnection.disconnect();

}

}

The ERROR message i get is:

com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect

from SAP gateway to RFC server failed

Connect_PM GWHOST=10.191.126.68, GWSERV=sapgw00, ASHOST=10.191.126.68,

SYSNR=00

LOCATION SAP-Gateway on host iscprojapp1w / sapgw00

ERROR connection to host 10.191.126.68, service sapgw00 timed out

TIME Thu Jul 28 16:06:19 2005

RELEASE 620

COMPONENT NI (network interface)

VERSION 36

RC -12

MODULE nixxi.c

LINE 821

DETAIL NiPConnect

COUNTER 2

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native

Method)

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(Unknown

Source)

at com.sap.mw.jco.JCO$Client.connect(Unknown Source)

at Connection1.main(Connection1.java:18)