Hi All,
I have created an User Enhancement Module that does encryption and decryption of the Message. The keys for Encryption and Decryption has been accessed from the J2EE Keystore.
The problem I am having is in accessing the Keystore. The part of the code is mentioned below
if (mode.compareToIgnoreCase("encrypt") == 0)
{
Audit.addAuditLogEntry( amk, AuditLogStatus.SUCCESS, "Encryption Called");
SAPSecurityResources secRes = SAPSecurityResources.getInstance();
Audit.addAuditLogEntry( amk, AuditLogStatus.SUCCESS, "Security Resource Created");
KeyStoreManager ksMgr = secRes.getKeyStoreManager(PermissionMode.SYSTEM_LEVEL);
Audit.addAuditLogEntry( amk, AuditLogStatus.SUCCESS, "KeyStore Manager Permission Called");
java.security.KeyStore ks = ksMgr.getKeyStore(privKeyView);
...........................
}
The Adapter Audit log shows me success till The "Security Resource Created". It is throwing error in creating the KeyStoreManager Object. I have already granted the EJB application the permissoons through Visual Admin. The Error messages are attached below.
*----
04.06.2008 14:49:27 Success Encryption Called
04.06.2008 14:49:27 Success Security Resource Created
04.06.2008 14:49:28 Error MP: Exception caught with cause com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback.
04.06.2008 14:49:28 Error Exception caught by adapter framework: Exception thrown in method process. The transaction is marked for rollback.
*----
If anybody has worked on this it would be great if you inform if I am doing something wrong or what needs to be done Also is there any way where i can go an debug the module.
Regards,
Arunava