• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

problem with WSAD5.1

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I WROTE A STATELESS SESSION BEAN AND A SMALL CLIENT CLASS TO ACCESS THAT BEAN.
IAM GETTING THE FOLLOWING EXCEPTIONS AT RUN TIME

javax.naming.ConfigurationException: The property com.ibm.ws.naming.wsn.factory.initial is not set. The most likely cause is that the jar which contains the file com/ibm/websphere/naming/jndiprovider.properties cannot be found by the class loader.
at com.ibm.websphere.naming.WsnInitialContextFactory.init_implClassCtor(WsnInitialContextFactory.java:190)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:108)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.init(InitialContext.java:231)
at javax.naming.InitialContext.<init>(InitialContext.java:207)
at JrsClient1.main(JrsClient1.java:40)
Exception in thread "main"


CAN ANYBODY EXPLAIN ME WHAT IS THE REAL PROBLEM..
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

It might be more pleasant if you use small caps in your posts.

Was the ejb successfully deployed?

Without making a client yourself, try use WSAD's Universal Test Client. Right-click on your class, and the option something like 'Launch Universal Test Client' will appear.

Once you are able to successfully transact using the UTC (Universal Test Client), then you know that the ejb is running ok, and that your problem is somewhere in the client.
 
John David
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually i did not wrote any business logic in bean .
all the problem is with client code which is calling that home object.
my client code is like this


public class JrsClient1 {
public static void main(String ar[]) throws Exception
{

Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");

System.out.println("after initial context factory");
env.put(Context.PROVIDER_URL,"iiop://localhost:2809");

Context context = new InitialContext(env);

Object ref = context.lookup("ejb/com/americanexpress/JRSStatelessHome");
System.out.println("after lookup");
JRSStatelessHome jhome= (JRSStatelessHome)PortableRemoteObject.narrow(ref,JRSStatelessHome.class);

JRSStateless jrsstateless=jhome.create();
System.out.println( jrsstateless.addJrs());
}

}



the exception im getting is

javax.naming.NameNotFoundException: ejb/com/americanexpress/JRSStatelessHome. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
at org.omg.CosNaming.Naming
ContextPackage.NotFoundHelper.read(NotFoundHelper.java:48)



pleaseeeeee help mee
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,

May this be the reason?

env.put(Context.PROVIDER_URL,"iiop://localhost:2809");




So your code works fine on the same machine your application server runs, but not on anywhere else? What happens when you put ip of your application server instead of "localhost" ?

Regards
Kurtcebe Eroglu
reply
    Bookmark Topic Watch Topic
  • New Topic