• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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: 42103
933
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.
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic