I am trying read the J2C Authentication Alias (UserId & Password) from my
servlet. I am using RAD 7 and built-in WAS 6.1 server.
I created the J2C authentication entry called testAlias.
Secure administration, applications, and infrastructure > JAAS - J2C authentication data. I saw WAS 6.1 added prefix(node name) for the alias I created like this:
nodeName/testAlias
When I tried to look up this alias using InitialContext, i keep getting the following error:
Here is the code to look up the Alias
InitialContext ctx = new InitialContext();
String str = (String) ctx.lookup("an27808Node02/testAlias");
7/16/08 14:50:17:018 CDT] 00000024 SystemErr R javax.naming.NameNotFoundException: Context: an27808Node02Cell/nodes/an27808Node02/servers/server1, name: an27808Node02/testAlias: First component in name an27808Node02/testAlias not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL
mg.org/CosNaming/NamingContext/NotFound:1.0]
[
Any help will be greatly appreciated...