cancel
Showing results for 
Search instead for 
Did you mean: 

JCO connection problem with router string

Former Member
0 Kudos

Hi all,

I have a java application, which is connecting to sap via Jco. All is working fine, when I´m calling the sap system without a router string. But when I´m outside of the company network, I need a router string. The connection via sap gui is working fine.

I´m doing the following:


String serverParam = "/H/sapgate.de.emea.csc.com/H/"+txtServer.getText();
		connection = JCO.createClient(txtClient.getText(),    // SAP client
						 			  txtUsername.getText(),  // userid
						 			  "xxx",  // password
									  null,                   // language
						 			  serverParam,    // application server
						 			  txtSystemNo.getText()); 

If I´m doing that without the router string inside the company network, everything is alright. If I try it with the router string, I´m getting the following error:

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

Connect_PM GWHOST=/H/myRouterString/H/ip, GWSERV=sapgw00, ASHOST=/H/myRouterString/H/ip, SYSNR=00

LOCATION SAProuter 37.9 on svswie003

ERROR timeout occured

Note, that the connection over sap gui and router string is working...

Thank you for your help!

Reward points guaranteed

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

JCO connection and SAPGui connection are using different ports. I had similar problem.

Ask administrator if proper ports are open. In my case it was port no 3299.