Hi all,
I have managed to add the appropriate library but encounter another problem.
It seems like port 4201 does not have the JNDI provider service running.
May I know whether geronimo built-in with JNDI provider service or not?
I noticed that there is LDAP service (which can be a JNDI provider
service to my understanding)running at port 1389 , and I tried to
change the jndi.properties to connect to port 1389 instead , however,
no luck , error still persist.
any idea ?
Thanks in advanced.
CG
On Mon, Apr 7, 2008 at 7:56 PM, CG <[EMAIL PROTECTED]> wrote:
> thanks david.
>
> I just wonder how do I add those libraries in the classpath in eclipse
> ? Is it going to Build path > add external jar ?
>
> Isn't the GEP have added those thing automatically ?
>
> thanks for your patient to guide a newbie of Java & eclipse.
>
>
>
>
> On Sun, Apr 6, 2008 at 11:21 PM, David Jencks <[EMAIL PROTECTED]> wrote:
> > The library you need in your client classpath is at
> >
> > repository/org/apache/openejb/openejb-client/*/openejb-client-*.jar
> >
> > thanks
> > david jencks
> >
> >
> >
> > On Apr 6, 2008, at 7:53 AM, CG wrote:
> >
> >
> > > 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>
> > >
> >
> >
>