Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Issue with lookup

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I love it when I find the answer from the old posts.
 
Get out of my mind! Look! A tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!