问题如下:
代码:
static String ABAP_AS_POOLED = "ABAP_AS_WITH_POOL";
private static Logger log;
static {
Properties connectProperties = new Properties();
connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "IP");//IP
connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, "00"); //编号
connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "300");//客户端
connectProperties.setProperty(DestinationDataProvider.JCO_USER, "test01"); //账号
connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "mima"); //密码
connectProperties.setProperty(DestinationDataProvider.JCO_LANG, "zh"); //语言
connectProperties.setProperty(DestinationDataProvider.JCO_POOL_CAPACITY, "10"); //连接数
connectProperties.setProperty(DestinationDataProvider.JCO_PEAK_LIMIT, "5"); //分页
createDataFile(ABAP_AS_POOLED, "jcoDestination", connectProperties);
}
om.sap.conn.jco.JCoException: (103) RFC_ERROR_LOGON_FAILURE: ##.#####,#### on 10.100.10.243 sysnr 00
at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:613)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1280)
at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:661)
at com.sap.conn.jco.rt.PoolingFactory.init(PoolingFactory.java:103)
at com.sap.conn.jco.rt.ConnectionManager.createFactory(ConnectionManager.java:171)
at com.sap.conn.jco.rt.DefaultConnectionManager.createFactory(DefaultConnectionManager.java:44)
at com.sap.conn.jco.rt.ConnectionManager.getFactory(ConnectionManager.java:160)
at com.sap.conn.jco.rt.RfcDestination.initialize(RfcDestination.java:789)
at com.sap.conn.jco.rt.RfcDestination.ping(RfcDestination.java:1002)
Caused by:
RfcException: [null]
message: ##.#####,#### on 10.100.10.243 sysnr 00
Return code: RFC_SYS_EXCEPTION(3)
error group: 103
key: RFC_ERROR_LOGON_FAILURE
at com.sap.conn.rfc.api.RfcApi.RfcOpen(RfcApi.java:211)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1273)
... 31 more
Caused by:
原因:账号或者密码错了。
解决方案 :我是用IDEA编译器,所以确保账号密码没问题后,重新编译一下再次运行项目就解决问题了。