tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tt...@ticnet.com
Subject Strange problem with URL_PKG_PREFIXES
Date Tue, 13 Mar 2001 23:15:41 GMT

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)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:286)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at SimpleServlet.printContextInfo(SimpleServlet.java:153)
    at SimpleServlet.doIt(SimpleServlet.java:99)
    at SimpleServlet.doGet(SimpleServlet.java:29)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:534)
    at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:325)
    at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:262)
    at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:386)
    at
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:144)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:140)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:211)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:140)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:211)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:254)
    at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:879)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
    at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:468)
    at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:879)
    at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2119)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
    at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:879)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:162)
    at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:879)
    at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:818)
    at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:893)
    at java.lang.Thread.run(Thread.java:484)

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.

Tim

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org


Mime
View raw message