You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by srinath narasimhan <sr...@nuviewinc.com> on 2003/01/09 00:17:50 UTC

Another JNDI Configuration issue


I am running tomcat 4.1.12 on Windows 2000 with jdk 1.4.1. I have configured
my datasource as a JNDI resource. This works just fine.
I am trying to deploy my application on linux ( jdk 1.4.1 and tomcat
4.1.12 ), when I try to access the JNDI resource I get a exception :

"Name java:comp is not bound in this Context".
In the log, I do see the message about creating a JNDI context. But I don't
know why would this say "java:comp" is not found exception ?

The Jsp code is simple

	Context initCtx = new InitialContext();
	out.print("<br/>");
	out.print(initCtx.lookup("java:comp").toString());
	out.print("<br/>");

This works on the windows 2000 deployment, but not on the linux box.

Any ideas/suggestion would be of great help.
Thanks in advance
Srinath.


-----Original Message-----
From: Rob Lagana [mailto:roblagana@hotmail.com]
Sent: Wednesday, January 08, 2003 18:08
To: roblagana@hotmail.com; tomcat-user@jakarta.apache.org
Subject: Re: why doesn't tomcat see my correct keystore?




I found out that tomcat was looking at the .keystore default...
However I specified in the server.xml file the below and tomcat just ignores
it.

The traditional:

<!--  Define a SSL Coyote HTTP/1.1 Connector on port 443
  -->
- <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="443" minProcessors="5" maxProcessors="75" enableLookups="true"
acceptCount="100" debug="0" scheme="https" secure="true"
useURIValidationHack="false" disableUploadTimeout="true">
  <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
clientAuth="false" protocol="TLS" />
  <Parameter Name="keystore" Value="C:/keystore/newstore" />
  <Parameter Name="keypass" Value="changeit" />
  </Connector>


It sees the HTTPS port 443 but ignores the keystore and keypass parameters..
I also tried:

<!--  Define a SSL Coyote HTTP/1.1 Connector on port 443
  -->
- <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="443" minProcessors="5" maxProcessors="75" enableLookups="true"
acceptCount="100" debug="0" scheme="https" secure="true"
useURIValidationHack="false" disableUploadTimeout="true">
  <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
clientAuth="false" protocol="TLS" />
  keystoreFile="C:/keystore/newstore" keystorePass="changeit" />
  <Parameter Name="keypass" Value="changeit" />
  </Connector>

Tomcat still does not read the values. It keeps looking at the .keystore
file located in c:\documents and settings\admin\

Where can I change this path??

Thanks,
Rob








==========

Hello,

Using tomcat 4.1 on a Windows 2000 sp3 system
Used keytool to generate the alias tomcat and keystore called mykeystore
Create a self signed cert.. used the default password changeit

I then created a CSR from using the keystore.. Imported the signed cert from
the external CA into the keystore mykeystore

did a -list -keystore mykeystore and it should be the cert..

I then added the attributes to my server.xml file to use point to the new
mykeystore location with password.. saved and started up tomcat

For some reason it's still looking at the self signed cert and not the new
one.

What exactly is it looking at?

What am I doing wrong?

Thanks,
Roh

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Another JNDI Configuration issue

Posted by srinath narasimhan <sr...@nuviewinc.com>.
I have tried that. It still gives me the same error.
Thanks
Srinath.



-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@apache.org]
Sent: Wednesday, January 08, 2003 21:01
To: Tomcat Users List
Subject: Re: Another JNDI Configuration issue




On Wed, 8 Jan 2003, srinath narasimhan wrote:

> Date: Wed, 8 Jan 2003 18:17:50 -0500
> From: srinath narasimhan <sr...@nuviewinc.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Another JNDI Configuration issue
>
>
>
> I am running tomcat 4.1.12 on Windows 2000 with jdk 1.4.1. I have
configured
> my datasource as a JNDI resource. This works just fine.
> I am trying to deploy my application on linux ( jdk 1.4.1 and tomcat
> 4.1.12 ), when I try to access the JNDI resource I get a exception :
>
> "Name java:comp is not bound in this Context".
> In the log, I do see the message about creating a JNDI context. But I
don't
> know why would this say "java:comp" is not found exception ?
>
> The Jsp code is simple
>
> 	Context initCtx = new InitialContext();
> 	out.print("<br/>");
> 	out.print(initCtx.lookup("java:comp").toString());
> 	out.print("<br/>");
>
> This works on the windows 2000 deployment, but not on the linux box.
>

Dunno if its the only problem, but you really want:

  out.print(initCtx.lookup("java:comp/env").toString());

in order to get the environment context for your webapp.  To optimize
performance, there is not a requirement that the "java:comp" context
actually exist.

Craig


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Another JNDI Configuration issue

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 8 Jan 2003, srinath narasimhan wrote:

> Date: Wed, 8 Jan 2003 18:17:50 -0500
> From: srinath narasimhan <sr...@nuviewinc.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Another JNDI Configuration issue
>
>
>
> I am running tomcat 4.1.12 on Windows 2000 with jdk 1.4.1. I have configured
> my datasource as a JNDI resource. This works just fine.
> I am trying to deploy my application on linux ( jdk 1.4.1 and tomcat
> 4.1.12 ), when I try to access the JNDI resource I get a exception :
>
> "Name java:comp is not bound in this Context".
> In the log, I do see the message about creating a JNDI context. But I don't
> know why would this say "java:comp" is not found exception ?
>
> The Jsp code is simple
>
> 	Context initCtx = new InitialContext();
> 	out.print("<br/>");
> 	out.print(initCtx.lookup("java:comp").toString());
> 	out.print("<br/>");
>
> This works on the windows 2000 deployment, but not on the linux box.
>

Dunno if its the only problem, but you really want:

  out.print(initCtx.lookup("java:comp/env").toString());

in order to get the environment context for your webapp.  To optimize
performance, there is not a requirement that the "java:comp" context
actually exist.

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>