cancel
Showing results for 
Search instead for 
Did you mean: 

Jco: Error Connecting using sapgw04

Former Member
0 Kudos

Hi,

I have a problem using Jco to connect to a SAP-System.

I'm trying to connect to SAP using the following configuartions:

sysnr: 04

GWServ: sapgw00

GWHost: XXX.YYY.com

ASHost: XXX.YYY.com

The code to create a repository for this configuration is:

JCO.addClientPool(poolname, maxpoolsize, "538", "username", "password", "DE",

"XXX.YYY.com", "04", "XXX.YYY.com", "sapgw00");

When I use this pool to get a function I get an Exception:

com.sap.mw.jco.JCO$Exception: (123) JCO_ERROR_FUNCTION_NOT_FOUND: Server repository could not create function template '[FUNCTIONNAME]'

caused by: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect from SAP gateway to RFC server failed

Connect_PM

GWHOST=XXX.YYY.com , GWSERV=sapgw00, ASHOST=XXX.YYY.com , SYSNR=04

LOCATION

SAP-Gateway on host h33e / sapgw00

ERROR partner not reached

(host XXX.YYY.com , service <b>sapgw04</b>)

[...]

The strange thing is the sapgw04 in the error-message.

Somehow JCO wants to use sapgw04 to connect to the RFC-Server. Is this an error in the SAP-Configuration or do I have to change the configuration of Jco?

How can I tell Jco not to use sapgw04 but sapgw00?

Any help would be appreciated!

Thanks

Torsten

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Torsten,

please check how you log on to your system. You are giving a system number 04, which corresponds to sapgw04. I'm not sure why the method needs all the information, seems to be duplicate to me (please comment if I'm wrong); it should be sufficient to use:

addClientPool(String key,
   int max_connections,
   String client,
   String user,
   String passwd,
   String lang,
   String ashost,
   String sysnr)

If you don't want to use sapgw04, just specify "00" for the sysnr.

Hope this helps, harald

gregorw
Active Contributor
0 Kudos

Hello Torsten,

is there an entry for sapgw00 and sapgw04 in your services file?

Regards

Gregor

Former Member
0 Kudos

Hi Gregor,

there is no entry for sapgw00 and sapgw04 in my services file. Is this necessary? When I connect (from the same client-machine) to an other sap system on sapgw00 and sysno 00 it works.

Thanks

Torsten

Former Member
0 Kudos

Torsten,

you're saying that it works from another system, when using sapgw00 and sysno 00. So again, why are you using system number 04 in your original post?

Best wishes, harald

Former Member
0 Kudos

Hi Harald,

I got the connection information from the customer. I asked again and....

You are right it is sapgw00 and sysno 00.

thanks for the hint!

Torsten

ps.: Sorry for the late answer!