• Post Reply Bookmark Topic Watch Topic
  • New Topic

Ejb call fails to Websphere Server. NameNotFoundException  RSS feed

 
Martin Lerchster
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi have a problem with calling a Ejb in Websphere Application Server from a local process!

The EJBs are deployed an useable from JSPs.

But if i want to lookup for a EJB from a local process i get a NameNotFoundException!

Properties objProperties = new Properties();
objProperties.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
objProperties.put(Context.PROVIDER_URL,"iiop://localhost:901");
InitialContext ctx = new InitialContext(objProperties);

IPartnerBocHome home = (IPartnerBocHome) PortableRemoteObject.narrow(ctx.lookup("ejb/PartnerBoc"), IPartnerBocHome.class);


20060223120106996 ERROR mailsender.process.ExecuteMailSender - javax.naming.NameNotFoundException: ejb/PartnerBoc
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:128)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at mailsender.process.ExecuteMailSender.sendMails(ExecuteMailSender.java:169)
at mailsender.process.RunMailSenderProcess.run(RunMailSenderProcess.java:58)
at mailsender.process.StartMailSenderProcess.main(StartMailSenderProcess.java:22)
at mailsender.process.RunMailSenderProcess.run(RunMailSenderProcess.java:58)
at mailsender.process.StartMailSenderProcess.main(StartMailSenderProcess.java:22)

I'm starting the process from WSAD 5.1 where also the WAS5 is started.

thx for help
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37181
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin,
What do you mean by a "local process" ? An application client, a regular Java class, ...
 
Martin Lerchster
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its a simple Javaclass
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!