You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Robert Upshall <ru...@psasoft.com> on 2007/10/16 18:27:48 UTC

jndi.properties in Tomcat 5.5.23 ??

I have an existing application that accesses JBoss with the jndi info 
defined in the jndi.properties file.

I want to make a web enabled version of that application.  I have copied 
the access code from my application into my servlet.  When I run the 
servlet I get :

"javax.naming.NameNotFoundException: Name UtilitiesFacadeEJB is not 
bound in this Context"

I know this is a jndi problem, where do I need to put my jndi.properties 
file in Tomcat 5.5.23 for my InitialContext to find it?

Here is my jndi.properties file:

-----
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=172.16.145.140
------

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jndi.properties in Tomcat 5.5.23 ??

Posted by Konstantin Kolinko <kn...@gmail.com>.
I do not have recent experience with JNDI, so the following are just
my guesses, trying to help.

May be someone will provide a better answer, or You will be able to
find it by yourself.

Thus said, it looks to me that what you are trying is not possible.

As seen from [1], Tomcat 5.5 already has some meaningful configuration
for new InitialContext(), thus your jndi.properties will
overwrite/conflict with that one.

[1]: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html

Thus, you may want to explicitly specify the set of properties, using
new InitialContext(Hashtable<?,?> environment)
          "Constructs an initial context using the supplied environment."

It should work.

It is a theory. It may be wrong somehow.

2007/10/16, Robert Upshall <ru...@psasoft.com>:
> I have an existing application that accesses JBoss with the jndi info
> defined in the jndi.properties file.
>
> I want to make a web enabled version of that application.  I have copied
> the access code from my application into my servlet.  When I run the
> servlet I get :
>
> "javax.naming.NameNotFoundException: Name UtilitiesFacadeEJB is not
> bound in this Context"
>
> I know this is a jndi problem, where do I need to put my jndi.properties
> file in Tomcat 5.5.23 for my InitialContext to find it?
>
> Here is my jndi.properties file:
>
> -----
> java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
> java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
> java.naming.provider.url=172.16.145.140
> ------
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org