SAP Knowledge Base Article - Public

3437405 - SAP Java Connector - Name or password is incorrect Error when A JCo Standalone Application connect S/4HANA cloud via Websocket RFC

Symptom

When building connection A JCo Standalone Application connect S/4HANA cloud via Websocket RFC, below error show up in the trace.

[JCoAPI] JCoClient.connect() using { jco.client.wsport=443, jco.client.destination=MY_DESTINATION, jco.client.type=W, jco.client.wshost=myxxxxxx.s4hana.cloud.sap, jco.destination.userid=xxxxx, jco.client.passwd=<secret>, jco.destination.auth_type=CONFIGURED_USER, propertiesProvider=test_sap_btp.SAPDestinationProvider, jco.client.user=xxxx } failed with com.sap.conn.jco.JCoException: (103) JCO_ERROR_LOGON_FAILURE: Name or password is incorrect (repeat logon) (remote system is [CFV|myxxxxxx.s4hana.cloud.sap:443])
main <1> [2024-02-16 11:52:57.457]: [JCoAPI] Exception occurred:
com.sap.conn.jco.JCoException: (103) JCO_ERROR_LOGON_FAILURE: Initialization of repository destination MY_DESTINATION failed: Name or password is incorrect (repeat logon)
    at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:1651)
    at com.sap.conn.jco.rt.RepositoryManager.getRepository(RepositoryManager.java:27)
    at com.sap.conn.jco.rt.RfcDestination.initRepository(RfcDestination.java:1555)
    at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:1939)
    at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:40)
    at test_sap_btp.SAPFunctionCall.main(SAPFunctionCall.java:23)
Caused by: com.sap.conn.jco.JCoException: (103) JCO_ERROR_LOGON_FAILURE: Name or password is incorrect (repeat logon) (remote system is [CFV|myxxxxxx.s4hana.cloud.sap:443])
    at com.sap.conn.jco.rt.AbstractConnection.generateJCoException(AbstractConnection.java:615)

Environment

JCo 3.1.8 - 3.1.9

Reproducing the Issue

Triggering connection test from the JCo Standalone Application.

Cause

Using incorrect JCo parameter jco.client.user for building the connection.

Resolution

Using parameter jco.client.alias_user instead of jco.client.user from JCo end.

The system's alias username was maintained by the system administrator.  You may find more information in the following SAP Help pages: Set Up Inbound RFC from On-Premise Systems and User Logon Properties.

Keywords

JCo, Websocket RFC, S/4HANA  Cloud, Name or password is incorrect , KBA , BC-MID-CON-JCO , Java-Connector , Problem

Product

SAP S/4HANA Cloud Public Edition 2402