• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How do I run Application Client Modules in WSAD

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
How do I run an Application Client Module under the WSAD Test Environment. I have defined JNDI references to the EJB's used in the application client deployment descriptor and started the a Test Server running with the EJB's loaded. The only way I can see to run the Client class is to switch to the Java or Debug view and run from there. However when I do this, I get the following error...
Caught an exception.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:292)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at guysports.ejb.client.PlayerClient.main(PlayerClient.java:24)
The code in the main() method for PlayerClient starts with...
try {
Context initial = new InitialContext();
Object objref = initial.lookup("ejb/PlayerHome");
PlayerHome playerHome = (PlayerHome)PortableRemoteObject.narrow(objref, PlayerHome.class);
.
.
.
This is run in a Websphere 5.0 Test Environment
Thanks in advance
Guy Barden
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Did you resolve this issue? I am getting the same exception (using WSAD too)
 
author
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
J2EE Application clients need to be created as an Applicaiton Client.

Then, from the Run menu, select Run... and select WebSphere v5 Applicaiton Client.
 
reply
    Bookmark Topic Watch Topic
  • New Topic