Skip to Content
author's profile photo Former Member
Former Member

Can not connect using JCO

Hi, I am trying to access an R/3 system from Java using the JCO.

The connection code is : (text between '<' and '>' replaces actual values)

-


mConnection = JCO.createClient(

"<client>", // SAP client

"<user>", // userid

"<password>", // password

"<languaje>", // language

"<host_name>", // application server host name

"00" // SAP system number

);

mConnection.connect();

-


And the error output:

-


com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed

Connect_PM GWHOST=<host_name>, GWSERV=sapgw00, ASHOST=<host_name>, SYSNR=00

LOCATION CPIC (TCP/IP) on local host

ERROR partner not reached (host <host_name>, service 3300)

TIME Thu Jul 08 10:57:31 2004

RELEASE 620

COMPONENT NI (network interface)

VERSION 36

RC -10

MODULE ninti.c

LINE 979

DETAIL NiPConnect2

SYSTEM CALL SO_ERROR

ERRNO 10051

ERRNO TEXT WSAENETUNREACH: Network is unreachable

COUNTER 1

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

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:1001)

at com.sap.mw.jco.JCO$Client.connect(JCO.java:2926)

at ConexionSAP.main(ConexionSAP.java:28)

Process java exited with code 1

-


When I exec a niping against <host_name> it can connect through 3200, but not 3300. Srfctest.exe does not connect either. However I can start a Windows Sapgui and connect to R/3 and work as usual. What am I missing here?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 09, 2004 at 06:04 AM

    Hello Antonio,

    is there a firewall between the computer where the JCO is running and the SAP Application Server?

    Regards

    Gregor

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.