jco 1.1 and using gateway to SAP


[ Follow Ups ] [ Post Followup ] [ Message Board ]

Posted by [IP Address: 195.179.4.138] 'anssi bragge' on August 17, 2001 at 08:34:39 EST:

Hi,

I've run into a strange problem. I'm using jco 1.1, and am trying to establish a connection to our SAP system over a saprouter.

I have in my code

final String[][] loginParams = {
{"client", "200" } , // SAP client
{"userid", "batch" }, // userid
{"passwd", "****" } , // password
{"language", "DE" } , // language
{"ashost", "sap" } , // host name
{"sysnr", "00" } , // system number
{"gwhost", "saprouter" },// gateway host
{"gwserv", "sapgw00" } // gateway service


.. and later I call

connection = JCO.createClient(loginParams);
connection.connect();

Now, for some reason I get errors like

com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
Connect_PM GWHOST=sap, GWSERV=sapgw00, ASHOST=sap, SYSNR=00

LOCATION CPIC (TCP/IP) on local host
ERROR partner not reached (host sap, service 3300)

TIME Fri Aug 17 13:38:32 2001
RELEASE 46D
COMPONENT NI (network interface)
VERSION 34
RC -10
MODULE ninti.c
LINE 1001
DETAIL NiPConnect2
SYSTEM CALL SO_ERROR
ERRNO 10060
ERRNO TEXT WSAETIMEDOUT: Connection timed out
COUNTER
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:589)
at com.sap.mw.jco.JCO$Client.connect(JCO.java:2219)
at ReServ.doPost(ReServ.java:95)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)


No matter how I construct the parameters for the JCO.createClient(), I always get in the error message the GWHOST defined as sap, and not saprouter!

Of course the SAPGui works (altho over port 3299, we have another saprouter running on port 3300).

But what causes this behaviour of changing (or not initializing correct) the value of gwhost??

It's pretty frustrating. No matter what I do, if I construct the arguments in a Properties -hash or whatever, the value of gwhost is always wrong.

Now, if I change it so that both gwhost and ashost are "saprouter", then the value of gwhost is correct, but I get the error message

com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
Connect_PM GWHOST=saprouter, GWSERV=sapgw00, ASHOST=saprouter, SYSNR=00

LOCATION CPIC (TCP/IP) on local host
ERROR connection to partner broken

TIME Fri Aug 17 14:37:44 2001
RELEASE 46D
COMPONENT NI (network interface)
VERSION 34
RC -6
MODULE ninti.c
LINE 1103
DETAIL NiPRead
SYSTEM CALL recv
COUNTER 11

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:589)
at com.sap.mw.jco.JCO$Client.connect(JCO.java:2219)
at ReServ.doPost(ReServ.java:95)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)


Meaning, that somehow the ashost value is always copied to gwhost!?

Has someone had problems like this yet? the JCO is new, I know, but there just has to be people who have used it already with gateways.

Could it then be a JCO internal bug?

Regards,

Anssi Bragge



Follow Ups:



Post a Followup


Name:
E-Mail:
Subject:

Message:


[ Follow Ups ] [ Post Followup ] [ Message Board ]