This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SOS!NameNotFoundException of my HelloWorldejb  RSS feed

 
Tom Keaton
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HelloWorld.java

HelloWorldHome.java

HelloWorldBean.java

Lookup.java

it compiled successfully!
then I start tnameserv.exe,it ok!
but when I type:
java Lookup com.sun.jndi.cosnaming.CNCtxFactory iiop://localhost:900 HelloWorldHome
it error:
javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingCo
ntextPackage.NotFound]
javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingC
ontextPackage.NotFound
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(Unknown So
urce)
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(Unknown
Source)
at org.omg.CosNaming._NamingContextStub.resolve(Unknown Source)
at com.sun.jndi.cosnaming.CNCtx.callResolve(Unknown Source)
at com.sun.jndi.cosnaming.CNCtx.lookup(Unknown Source)
at com.sun.jndi.cosnaming.CNCtx.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at Lookup.main(Lookup.java:23)
[ April 29, 2004: Message edited by: Tom Keaton ]
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you correctly specify the JNDI name your home method will be bound to when deployed by your container?
 
Tom Keaton
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to do in Tomcat?any help can appreciate!
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37222
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom,
You would need to deploy your ejb into a server. However, Tomcat doesn't support ejbs, so you need to find an application server.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!