File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes BEA/Weblogic and the fly likes Problem In Running Clinet Appplication For HelloWorld Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Problem In Running Clinet Appplication For HelloWorld Bean" Watch "Problem In Running Clinet Appplication For HelloWorld Bean" New topic

Problem In Running Clinet Appplication For HelloWorld Bean

Pardha Saradhi Janaswami

Joined: Sep 05, 2003
Posts: 7
Dear All,
I am facing a new problem in running the java clinet application for the Depoyed bean(HelloWorld)... My Code for Client Application is as follows...
package org.acme;
import javax.rmi.*;
import javax.naming.*;
import java.util.*;
public class HelloWorld
public static void main( String args[])
Hashtable p = new Hashtable();
p.put(javax.naming.Context.PROVIDER_URL, "t3://");

InitialContext ctx = new InitialContext( p );

Object obj = ctx.lookup("/Hello");

HelloHome ejbHome = (HelloHome)
HelloObject ejbObject = ejbHome.create();

String message = ejbObject.sayHello();

System.out.println( message );

catch (Exception e)
This Application is compiling without any errors.. During Run Time the following execption is raised...
javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialConetxtFactory. Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialConetxtFactory
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at com.sun.naming.internal.VersionHelper12.loadClass VersionHelper
at javax.naming.spi.NamingManager.getInitialContextNamingManager
at javax.naming.InitialContext.getDefaultInitCtx InitialContext
at javax.naming.InitialContext.init(
at javax.naming.InitialContext.<init>(
at org.acme.HelloWorld.main(
Any Suggestions please.....
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1868
You need to have weblogic.jar in the classpath of your client.
I agree. Here's the link:
subject: Problem In Running Clinet Appplication For HelloWorld Bean
It's not a secret anymore!