I've seen several references to my problem in this forum, but I still can't find an answer. I'm trying to call an EJB I've deployed in Weblogic 6.1 from a client application in Tomcat which is running on different machine. My client code is:
Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory"); p.put(Context.PROVIDER_URL, "t3://myEJBServer:7001"); Context ctx = new InitialContext(p); Object mybeanhome = ctx.lookup("myBeanJNDIName"); MyBeanHome home = (MyBeanHome) PortableRemoteObject.narrow(mybeanhome, MyBeanHome.class); MyBean mybean = (MyBean) PortableRemoteObject.narrow(home.create(), MyBean.class);
I placed the weblogic.jar file in the %CATALINA_HOME%\common\lib folder on the Tomcat machine. However, when I run this, Tomcat throws the following error:
"javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.InitialContextFactory]"
It appears that Tomcat is not seeing the weblogic.jar file, but no matter where I put it, I still get the same error.