JAVA连接SAP时出现的错误(102)|JAVA连接SAP时出现的错误(102) JCO_ERROR_COMMUNICATION(Connect to SAP gateway failed)
JAVA连接SAP时出现的错误(102) JCO_ERROR_COMMUNICATION: Initialization of repository destination ABAP_AS_WITH_POOL failed: Connect to SAP gateway failed 解决办法
com.sap.conn.jco.JCoException: (102) JCO_ERROR_COMMUNICATION: Initialization of repository destination ABAP_AS_WITH_POOLfailed: Connect to SAP gateway failed
Connection parameters: TYPE=A DEST=ABAP_AS_WITH_POOL ASHOST=172.20.0.172 SYSNR=51 PCS=1LOCATIONCPIC (TCP/IP) on local host with Unicode
ERRORpartner '172.20.0.172:3351' not reached
TIMESun Apr 28 18:47:59 2019
RELEASE721
COMPONENTNI (network interface)
VERSION40
RC-10
MODULEnixxi.cpp
LINE3289
DETAILNiPConnect2: 172.20.0.172:3351
SYSTEM CALL connect
ERRNO10060
ERRNO TEXTWSAETIMEDOUT: Connection timed out
COUNTER2
at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:1100)
at com.sap.conn.jco.rt.RepositoryManager.getRepository(RepositoryManager.java:29)
at com.sap.conn.jco.rt.RfcDestination.initRepository(RfcDestination.java:1049)
at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:1193)
at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:33)
at com.pcmall.MultiFromSAP.main(MultiFromSAP.java:16)
Caused by: com.sap.conn.jco.JCoException: (102) JCO_ERROR_COMMUNICATION: Connect to SAP gateway failed
Connection parameters: TYPE=A DEST=ABAP_AS_WITH_POOL ASHOST=172.20.0.172 SYSNR=51 PCS=1LOCATIONCPIC (TCP/IP) on local host with Unicode
ERRORpartner '172.20.0.172:3351' not reached
TIMESun Apr 28 18:47:59 2019
RELEASE721
COMPONENTNI (network interface)
VERSION40
RC-10
MODULEnixxi.cpp
LINE3289
DETAILNiPConnect2: 172.20.0.172:3351
SYSTEM CALL connect
ERRNO10060
ERRNO TEXTWSAETIMEDOUT: Connection timed out
COUNTER2
at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:625)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1384)
at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:704)
at com.sap.conn.jco.rt.RepositoryConnection.connect(RepositoryConnection.java:72)
at com.sap.conn.jco.rt.PoolingFactory.init(PoolingFactory.java:115)
at com.sap.conn.jco.rt.ConnectionManager.createFactory(ConnectionManager.java:349)
at com.sap.conn.jco.rt.DefaultConnectionManager.createFactory(DefaultConnectionManager.java:46)
at com.sap.conn.jco.rt.ConnectionManager.getFactory(ConnectionManager.java:323)
at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:1094)
... 5 moreCaused by: RfcException:
message: Connect to SAP gateway failed
Connection parameters: TYPE=A DEST=ABAP_AS_WITH_POOL ASHOST=172.20.0.172 SYSNR=51 PCS=1LOCATIONCPIC (TCP/IP) on local host with Unicode
ERRORpartner '172.20.0.172:3351' not reached
TIMESun Apr 28 18:47:59 2019
RELEASE721
COMPONENTNI (network interface)
VERSION40
RC-10
MODULEnixxi.cpp
LINE3289
DETAILNiPConnect2: 172.20.0.172:3351
SYSTEM CALL connect
ERRNO10060
ERRNO TEXTWSAETIMEDOUT: Connection timed out
COUNTER2return code: RFC_FAILURE (1)
error group: 102
key: RFC_ERROR_COMMUNICATION
at com.sap.conn.rfc.engine.RfcIoControl.error_end(RfcIoControl.java:259)
at com.sap.conn.rfc.engine.RfcIoControl.ab_rfcopen(RfcIoControl.java:101)
at com.sap.conn.rfc.api.RfcApi.RfcOpen(RfcApi.java:81)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1348)
... 12 more
【JAVA连接SAP时出现的错误(102)|JAVA连接SAP时出现的错误(102) JCO_ERROR_COMMUNICATION(Connect to SAP gateway failed)】遇到以上错误时,你的连接程序中可能缺少了Router字符串
connectProperties.setProperty(DestinationDataProvider.JCO_SAPROUTER,"xxxxxx");
加上这段代码,再试一下应该就可以了,希望可以帮到你。
推荐阅读
- JAVA(抽象类与接口的区别&重载与重写&内存泄漏)
- 事件代理
- Java|Java OpenCV图像处理之SIFT角点检测详解
- java中如何实现重建二叉树
- 数组常用方法一
- 【Hadoop踩雷】Mac下安装Hadoop3以及Java版本问题
- Java|Java基础——数组
- RxJava|RxJava 在Android项目中的使用(一)
- java之static、static|java之static、static final、final的区别与应用
- Java基础-高级特性-枚举实现状态机