• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

JNDI lookup

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
When trying to access an EJB from a Java client, I get the exception
Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory].
What could be the problem? Could the problem be with the classpath settings or is some work required to be done in the Adminsitrative console. I am using Websphere Application Server 4.0
Please help
Thank you Swarna
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do u have all client jar files containing stubs on the classpath of your client program.
Do u using VAJ to develope then generate the client.jar file from VAJ and put the same in classpath of your client program.
Mike
 
swarna jaya
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike,
Thanks for the help. But what are the client jar files required? I have the home interface,remote interface, bean class in a jar and I have made sure this is in the classpath. Apart from this what else is required?
Thank you Swarna jaya

Originally posted by G Mike:
Do u have all client jar files containing stubs on the classpath of your client program.
Do u using VAJ to develope then generate the client.jar file from VAJ and put the same in classpath of your client program.
Mike

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think ur missing the jndi.jar from ur classpath (which should contain that WsnInitialContextFactory class). However, I recommend u use launchClient to run ur client application. Look into Kyle's Workbook and it gives a very lucid explanation of the process.
HTH,
PJ
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swarna,
Make sure your EJB is in the JNDI tree. With WebSphere running, run WebSphere/Appserver/dumpNameSpace.bat.
I second looking at Kyle's EJB workbook www.store.yahoo.com/titan-books/download.html
*** although note workbook Errata -> www.jmiddleware.com/workbooks/websphere_errata.html
I did have success once "Uninstalling" an EJB and "reinstalling" FWIW with AEs using the Admin Console.
Hope that helps.
Mike
[ April 11, 2002: Message edited by: Mike Jones ]
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike,
DumpNameSpace.bat is to be run from this location
d:\websphere\appserver\
or from
d:\websphere\appserver\bin
this location.
thanks
 
Mike Jones
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
R,
Yes, /WebSphere/Appserver/bin.
Sorry for the typo.
Mike
 
Do not threaten THIS beaver! Not even with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic