cancel
Showing results for 
Search instead for 
Did you mean: 

Can not connect using JCO

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

gregorw
Active Contributor
0 Kudos

Hello Antonio,

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

Regards

Gregor

Former Member
0 Kudos

Hello Gregor,

Maybe, it is a machine in other company's network, but I do not have any information about the network I am trying to connect to. I cannot request them to modify anything in the network. Are there ways to circumvent that limitation? I have developer access to the R/3 host and I can use SM59, SM54, SM55 and other system transactions, but I do not know what to do (and if something can be done).

Regards,

Antonio

Former Member
0 Kudos

Hi,

did you make sure that there is no spelling error in your actual values ?

And you might check in your logon pad if you connect to an application server directly or do you use a message server. That might be different in creating the JCO-Client.

Regards, Astrid

Former Member
0 Kudos

Hi Astrid,

no, there is no spelling error as far as I know. Regarding to the connection, I use a direct connection to the application server.

Regards

gregorw
Active Contributor
0 Kudos

Hello Antonio,

I think you should have a look at the Thread "JCO connection through SAP Router": When you look at your SAP Logon Pad configuration do you find a SAP Router String?

Regards

Gregor