• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem In Running Clinet Appplication For HelloWorld Bean  RSS feed

Pardha Saradhi Janaswami
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:207)
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(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at org.acme.HelloWorld.main(HelloWorld.java:22)
Any Suggestions please.....
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to have weblogic.jar in the classpath of your client.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!