Win a copy of Murach's MySQL this week in the JDBC and Relational Databases 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SOS!NameNotFoundException of my HelloWorldejb

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to do in Tomcat?any help can appreciate!
 
author & internet detective
Posts: 41851
904
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic