Showing results for 
Search instead for 
Did you mean: 

Error accessing NetWeaver AS KeyStorage

Former Member
0 Kudos


As part of our solution we need to encrypt sensitive data handled by our application, and we would like to keep it using SAP NetWeaver tools. It means we have to use SAP API to access the server Security Key Storage.

First of all, we are using NetWeaver CE 7.2 (SP4) application server.


We have an EJB Module which we configured to use the following LIBS...


... which allowed us to use the SAPSecurityResources API. With this API we are able to access the Key Storage configured in NWA, and then encrypt the data we need.

We developed this using the following doc:


When we instantiate the API it is throwing an exception from what seems to be a dependency we are missing to realize, used inside the API, but we are not beeing able to find in which library it is located:

Code to start the API: Thats the first command, when we get the AS Key Storage to have access to Private/Public/Secret keys.

SAPSecurityResources secRes = SAPSecurityResources.getInstance();

Exception that is thrown: The type SecurityException is declared inside the API class in a catch/throw block. It is not beeing able to find those classes.

Caused by: java.lang.ClassNotFoundException:

The JARs that are reference in the actual LIBs:


We already tried to add other libraries into the dependency involving "secure" labels but we didnt manage to realize this dependency.

Anyonw knows which librarie should we add to our depency to solve this problem?
Is this the best approach that you would suggest to solve this encrypt solution in NetWeaver applications?

Please lemme know if any other information is needed to help understand my situation.

Best regards,


View Entire Topic
0 Kudos

Hi, this is a very old post but I want to re surface it. I'm have caught the exact same problem as you in this post. NoClassDefFoundError for SecurityException in an ejb class deployed in ear with DWP. the link you have provided does not work anymore. can you help.

P.S: I couldnt post a comment to the answer.