Hi, I am facing problem in using JNDI to do lookup. I have tried to
solve several problem using google before hitting this

I have materialType.properties and jndi.properties file deployed in geronimo

materialType.properties
================
jndi.process.ejb = java:comp/env/ejb/MaterialTestBean

jndi.properties
============
java.naming.factory.initial=org.openejb.client.RemoteInitialContextFactory
java.naming.provider.url=localhost:4201
java.naming.security.principal=system
java.naming.security.credentials=manager


The problem I face seems like not able to find the class
org.openejb.client.RemoteInitialContextFactory .
I think the reason should be openejb library missing or invalid but I
can't figure out where the openejb library in geronimo ..
Any help is appreciated , thanks.



Error msg
=========

javax.naming.NoInitialContextException: Cannot instantiate class:
org.openejb.client.RemoteInitialContextFactory [Root exception is
java.lang.ClassNotFoundException:
org.openejb.client.RemoteInitialContextFactory]
        at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
        at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:175)
        at 
test.com.quesofttech.FirstEJB3TutorialClient.main(FirstEJB3TutorialClient.java:39)
Caused by: java.lang.ClassNotFoundException:
org.openejb.client.RemoteInitialContextFactory



<more codes>
  ::
                InitialContext context;
                MaterialTestBeanRemote beanRemote = null;
                ResourceBundle      bundle = null;

              bundle = ResourceBundle.getBundle("materialType",
Locale.getDefault(), FirstEJB3TutorialClient.class.getClassLoader());
              String jndiName = bundle.getString("jndi.process.ejb");
                try
                {
                         context = new InitialContext();
                         beanRemote = (MaterialTestBeanRemote)
context.lookup(MaterialTestBean.RemoteJNDIName);
                         beanRemote.testMaterial();
                         beanRemote.testMaterialType();
               }

 <more codes>

Reply via email to