aspose file tools*
The moose likes Websphere and the fly likes Issue with lookup  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Issue with lookup  " Watch "Issue with lookup  " New topic
Author

Issue with lookup

Ravi Hariharan
Greenhorn

Joined: Sep 11, 2006
Posts: 3
Issue with lookup

and

NamingException on call from WPS 6.1 Portlet to Remote EJB 3.0 on separate Machine

Hi All

Just attaching a small diagrammatic representation of my problem.


Hi all

i am trying to call a EJB3.0 in WAS 6.1.0.13 server from a WPS Express (WPS 6.1.0.15) that is in a separate instance.

i have got the signer certificate for a SSL Connection.

when i try to call the EJB i am able to get the Context

System.out.println(ctx.getEnvironment());



8/2/08 16:07:45:491 IST 00000042 SystemOut O {com.ibm.websphere.naming.hostname.normalizer=com.ibm.ws.na ming.util.DefaultHostnameNormalizer, java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory, com.ibm.websphere.naming.name.syntax=jndi, com.ibm.websphere.naming.namespace.connection=lazy, com.ibm.ws.naming.ldap.ldapinitctxfactory=com.sun.jndi.ldap.LdapCtxFactory, com.ibm.websphere.naming.jndicache.cacheobject=populated, com.ibm.websphere.naming.namespaceroot=defaultroot, com.ibm.ws.naming.implementation=WsnIpCos, com.ibm.ws.naming.wsn.factory.initial=com.ibm.ws.naming.util.WsnInitCtxFactory, java.naming.ldap.derefAliases=never, com.ibm.websphere.naming.jndicache.maxcachelife=0, com.ibm.websphere.naming.jndicache.maxentrylife=0, com.ibm.websphere.naming.jndicache.cachename=providerURL, java.naming.provider.url=iiop://172.25.17.56:10031, java.naming.factory.url.pkgs=com.ibm.ws.runtime:com.ibm.wps.jndi:com.ibm.iscpor tal.jndi:com.ibm.ws.naming}



but when it comes to lookup it give the following exception

Object obj = ctx.lookup("ejb/JPAEJBEAR/JPAEJB.jar/CreditorBean#com.dk.bs.ejb.CreditorI nterface");

System.out.println(obj.toString());

CreditorInterface credInterface = (CreditorInterface)PortableRemoteObject.narrow(obj, com.dk.bs.ejb.CreditorInterface.class);



Creditor objCreditor = new Creditor(new Integer(302), new Double(1.0D), new String("work"), new Date(), new Date(), new Date(), "test", new Date());

System.out.println(credInterface.toString());

credInterface.addCreditor(objCreditor);

System.out.println("Creditor Done");



8/2/08 16:07:46:229 IST 00000042 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:

Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl

Context method: lookupExt

Context name: infpw02817/nodes/infpw02817/servers/WebSphere_Portal

Target name: ejb/JPAEJBEAR/JPAEJB.jar/CreditorBean#com.dk.bs.ejb.CreditorInterface

Other data: ""
Exception stack trace: javax.naming.NoPermissionException: NO_PERMISSION exception caught [Root exception is org.omg.CORBA.NO_PERMISSION: JSAS0202E:

.

.

.

.

.

Caused by: org.omg.CORBA.NO_PERMISSION: JSAS0202E: Credential token expired. {1} vmcid: 0x49424000 minor code: 306 completed: No





I am getting the following error message and would appreciate if someone could guide me as to how to go about with solving this problem.
Soorya Prakash S
Greenhorn

Joined: Nov 11, 2008
Posts: 1
Hi,

You need to export and import LTPA keys for authentication.

The below steps will guide you for authentication.

Exporting LTPA key:

1.From Remote machine administrative console,
Security → Secure administrators, application and infrastructure → Authentication mechanisms and expiration.
2.Enter password and confirm it.
3.Enter a valid path with a name for the key file.
4.Click �Export Keys�.
5.Click ok and save the changes.



Importing LTPA key:

1.From administrative console,
Security → Secure administrators, application and infrastructure → Authentication mechanisms and expiration.
2.Enter password and confirm it.
3.Locally copy the imported key file from remote machine and enter the path of the key file.
4.Click �Import Keys�.
5.Click ok and save the changes.

Its done.

It removes your "javax.naming.NoPermissionException: NO_PERMISSION exception caught [Root exception is org.omg.CORBA.NO_PERMISSION: JSAS0202E: [{0}] Credential token expired." exception


I hope will be useful.

Regards,
Soorya Prakash.S
Tamil Nadu
India

[ November 11, 2008: Message edited by: Soorya Prakash S ]
[ November 11, 2008: Message edited by: Soorya Prakash S ]
mike kim
Greenhorn

Joined: Nov 08, 2011
Posts: 1
I love it when I find the answer from the old posts.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Issue with lookup