cancel
Showing results for 
Search instead for 
Did you mean: 

JAVA Connect SNC with error: No credentials were supplied

huiyong_tan
Explorer
0 Kudos
960

Hi Experts

I have an error when I try to connect SAP with SNC by sapjco3.jar lib,

the system environment is ok, because other SAP account working, I have tested already.

the configuration as bellow:

1. system32 folder put the sapjco3.jar and sapjco3.dll

2. the code specifies the dll SNC_LIB path:

3. and then run the jar application, got error as bellow:

4.this error only for one account, and other SAP account is ok for same system, I don't know where went wrong, maybe the cert configuration or SAP SNC server configuration. and I asked the local SAP supplier, but never replied.

some configurations as bellow:

import certification: sapgenpse import_own_cert

add certification user: sapgenpse.exe seclogin

Any help will be appreciated. Thanks!

View Entire Topic
Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

The error message "No credentials were supplied" means, that the Windows user, under which the java.exe process is running, does not have permission to access the Certificate Store. How does it get that permission? Well, here the first question to ask is: are you using Secure Login Client or did you just download the CommonCrypto Lib and copy it to D:\SAPSNC\SAPSNCx64\sapcrypto.dll?

I would recommend to install and use Secure Login Client (SLC), because it comes for free and makes the management of your user certificate very easy.

However, if you are not using SLC, you are responsible for setting up everything yourself, e.g. defining the correct SECUDIR environment variable, so the PSE file can be found, and using sapgenpse to grant the current Windows user, under which java.exe is running, the necessary permissions to access and use the certificates in the PSE file (or in the Microsoft Certificate Store). I see that you have already tried "sapgenpse seclogin", but either you were executing it for the wrong Windows user (not the one, which in the end executes java.exe), or you supplied the wrong PSE file (not the one containing the certificate used in SNC_MYNAME)?!

huiyong_tan
Explorer
0 Kudos

very useful, thanks for your advice, I will double check it.

gaurav_shah33
Explorer
0 Kudos

The steps you mentioned can be followed when java application is running on-premise system. Do you have steps what needs to be done when application is running on Cloud foundry. My application is running on cloud foundry. App container is having sapcryptolib.so file. While access the application getting exception:

 ERROR GSS-API(maj): No credentials were supplied

 Unable to establish the security context