cancel
Showing results for 
Search instead for 
Did you mean: 

JAVA Connect SNC with error: No credentials were supplied

huiyong_tan
Explorer
0 Kudos

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!

huiyong_tan
Explorer
0 Kudos

By the way, if the users use the classic authentication (user + password) they can log into the system with no problem.

Accepted Solutions (1)

Accepted Solutions (1)

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.

Answers (1)

Answers (1)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Simply follow the instructions of SAP note 1525059

huiyong_tan
Explorer
0 Kudos

I have no permission to visit this link.

HAL9000
Product and Topic Expert
Product and Topic Expert
0 Kudos

This raises the question: Why not?