According to NamingManager documentation, first it will look for
'org.jnp.interfaces.java.javaURLContextFactory' which does not exist, so it
should next look for 'org.apache.naming.java.javaURLContextFactory' which
does exist.
So, this should work.
BTW, the 'org.apache.naming' prefix is concatenated onto the URL prefixes by
jakarta.  Also, when the jnp.jar is removed, it still fails with the same
error.
How can this be made to work?

----- Original Message -----
From: Remy Maucherat <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 13, 2001 5:49 PM
Subject: Re: Strange problem with URL_PKG_PREFIXES


> > The Context.URL_PKG_PREFIXES environment variable is a colon-seperated
> list
> > of package prefixes.  However, when I set this environment variable to
> > "org.jnp.interfaces:org.apache.naming" and attempt to get a Context;
> >   Context ctx = new InitialContext().lookup("java:/comp");
> > The lookup fails with:
> > javax.naming.ConfigurationException: Provider URL missing
> >     at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:702)
>
> > However, when I set this environment variable to
> > "org.apache.naming:org.jnp.interfaces"
> > The lookup succeeds!
> > "org.jnp.interfaces" only contains one class and that is
> > "org.jnp.interfaces.jnp.jnpURLContextFactory".
> > It seems to me that the lookup code is not correctly parsing the
> > Context.URL_PKG_PREFIXES environment variable.
>
> It looks like the JNP InitialContext has a custom way to retrieve URL
> contexts.
> It's supposed to call NamingManager.getURLContext (see the
> javax.naming.InitialContext source code for more details).
>
> Remy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to