-
1. Re: InitilaContext instantiation error
mikefinn Apr 16, 2002 12:10 AM (in response to javier_arrieta)Javier,
Dumb question, but are you passing the properties object ("h" in you're example) to InitialContext constructor?
like...
InitialContext iCtx = new InitialContext(h);
Otherwise you'll need to set these pros via System.setProperty() or
-D propertyname=value on command line.
Mike -
2. Re: InitilaContext instantiation error
javier_arrieta Apr 16, 2002 1:04 PM (in response to javier_arrieta)Yes, of course I passed the Properties to the constructor...
Any other guess?
PS: Thnx anyway Mike -
3. Re: InitilaContext instantiation error
jsents Apr 16, 2002 2:25 PM (in response to javier_arrieta)We use the following settings
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL ,"jnp://localhost:1099");
We don't use Context.URL_PKG_PREFIXES setting.
Hope this Helps -
4. Re: InitilaContext instantiation error
lasterra Apr 17, 2002 4:59 PM (in response to javier_arrieta)Hola Javier,
Are you using winXP and jdk1.4.0???
I have a friend with the same problem and the only different between my config and his is that he's using winXP.
When i Instantiate the InitialContext a only do this:
Context initial = new InitialContext ();
no propierties, nothing, th jndi.propierties should be in your classpath, nothing else.
Please, tell me if you are using winxp and jdk1.4.0 becouse maybe is a bug.
Regards, Enrique. -
5. Re: InitilaContext instantiation error
javier_arrieta Apr 18, 2002 10:13 AM (in response to javier_arrieta)No, Enrique. I'm using Sun's jdk1.3.1_02 in a win2k machine. And i've also (my first tries) used the no-properties constructor with the same results.
Th most shocking issue is the ClassCastException error wrapped in a NamingException
Thanx anyway -
6. Re: InitilaContext instantiation error
lasterra Apr 18, 2002 6:24 PM (in response to javier_arrieta)Hola Javi,
We find the error¡¡¡
In our case the problem was that jndi.jar was inside the webapp (war file) in the lib directory. The problem was in our ANTs files.
When we correct it, the app was ok.
So i suspect that you have a similar problem, you are trying to cast a javax.naming.NoInitialContextException to a class different of org.jnp.interfaces.NamingContextFactory becouse in your CLASSPATH you have another jndi classess.
Hope That Help
Enrique. -
7. Re: InitilaContext instantiation error
lasterra Apr 18, 2002 6:25 PM (in response to javier_arrieta)Hola Javi,
We find the error¡¡¡
In our case the problem was that jndi.jar was inside the webapp (war file) in the lib directory. The problem was in our ANTs files.
When we correct it, the app was ok.
So i suspect that you have a similar problem, you are trying to cast a javax.naming.NoInitialContextException to a class different of org.jnp.interfaces.NamingContextFactory becouse in your CLASSPATH you have another jndi classess.
Hope That Help
Enrique.