I am new to OpenEJB.  So far, I am very pleased and would like to use this
for additional development.  I installed OpenEJB successfully in Tomcat 6.0
(download the .war, deployed to webapps, then ran the installer).  I created
a Bean and am able to successfully use this in a JSP program.  This works
just fine using the following code.

        p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.LocalInitialContextFactory");
        InitialContext context = new InitialContext(p);
        QdbInterface qdbcontext = (QdbInterface)
context.lookup("QdbBeanLocal");

However, I would like to use this same bean from within a purely java
applet.  If I put this above code into my java applets init() method, I get
the following error:

javax.naming.NoInitialContextException: Cannot instantiate class:
org.openejb.client.LocalInitialContextFactory [Root exception is
java.lang.ClassNotFoundException:
org.apache.openejb.client.LocalInitialContextFactory]

I have searched the message board and found a couple similar posts.  The
suggestion was to ensure that the openejb-core-3.1.jar is in the CLASSPATH.  

Could someone offer suggestion about what I am doing wrong?  What is the
difference between the successful JSP code and the unsuccessful java applet? 
I did add the openejb-core-3.1.jar to my classpath, but this didn't work. 
Any ideas?
-- 
View this message in context: 
http://www.nabble.com/Cannot-instantiate-class%3A-org.openejb.client.LocalInitialContextFactory-tp21965469p21965469.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to