cancel
Showing results for 
Search instead for 
Did you mean: 

Keystore Java access : ClassCastException on lookup

0 Kudos

Hello,

I am having trouble with Keystore access on Netweaver 7.01 SP5 with Java 1.4.2_18. I have read a lot of different solutions on the forums and nothing fixed it.

My code, that seems to work for a lot of people is as follows :


// Initialize SAP Keystore
InitialContext ctx = new InitialContext();
Object o = ctx.lookup(keystoreProvider);
KeystoreManager manager = (KeystoreManager) o;
KeyStore keyStore = manager.getKeystore("TicketKeystore");

I am waiting for an object of type Keystore, but the lookup returns me an object of type com.sap.engine.services.keystore.interfaces.KeystoreManagerWrapper_Stub. lookup call does not throw any exception, the exception occurs when I cast.

My code is called by an Iview, and everithing runs on the same portal.

I have found this article talking about the problem : [/people/chitrali.shah/blog/2008/12/02/jndi-lookup-operation-in-147webdynpro-gp-interface148-type-of-callable-object-implementation|/people/chitrali.shah/blog/2008/12/02/jndi-lookup-operation-in-147webdynpro-gp-interface148-type-of-callable-object-implementation]. Unfortunatly the proposed solution did not work for me : I still get a ClassCastException.

Could someone please help me?

Best Regards

Vincent

Edited by: S0002848628 on Feb 12, 2010 4:37 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Check the thread:

BR, Siarhei

0 Kudos

Thanks for your reply Siarhei. However, I do not encounter the same problem as those described in this thread. I have no RMI exception, and I cannot change the view of my keys in the keystore, as they are already used on the portal.

Best regards,

Vincent