You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "pablo.a.saavedra@gmail.com" <pa...@gmail.com> on 2011/02/17 22:34:30 UTC

Issue with JNDI datasources in Tomcat 6

Hi,

I'm trying to use JNDI datasources in Tomcat 6, using global naming
resources. My setup is identical to this one:

http://pro-programmers.blogspot.com/2008/07/spring-datasource-jndi-lookup-from.html

But I keep getting null when doing the lookup. I debugged the code a little
and the problem seems to be that the entry for the datasource  in the naming
context does not have an address element. Any tip as to what I might be
doing wrong?

Thanks.

Re: Issue with JNDI datasources in Tomcat 6

Posted by Mark Thomas <ma...@apache.org>.
On 20/02/2011 23:37, pablo.a.saavedra@gmail.com wrote:
> Hi, I based myself on a Tomcat 5.5 tutorial because that's what I found on
> the net.

Try the real docs:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html


> I did put the driver jar file in the lib/ directory, which is the
> place it belongs. I can see the datasources using lambda probe and if I
> debug the code the datasources are there, but the ref address of the JNDI
> entry that's resolved is empty and so it can't find the actual object.

Most likely a configuration problem. Since you haven't shown us any of
your configuration files, it is impossible to help further.

Mark

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


Re: Issue with JNDI datasources in Tomcat 6

Posted by "pablo.a.saavedra@gmail.com" <pa...@gmail.com>.
Hi, I based myself on a Tomcat 5.5 tutorial because that's what I found on
the net. I did put the driver jar file in the lib/ directory, which is the
place it belongs. I can see the datasources using lambda probe and if I
debug the code the datasources are there, but the ref address of the JNDI
entry that's resolved is empty and so it can't find the actual object.

Thanks again.

On 18 February 2011 17:49, Propes, Barry L <ba...@citi.com> wrote:

> You said you set that up exactly as done in the link below, and the link
> below shows this near the top:
>
> Figure: Tomcat 5.5 directory structure
> DB_Driver.jar
>
> Question - if you're on Tomcat 6 series, why are you configuring to the 5.5
> specs? I'm thinking they're done a bit differently.
>
> Maybe Chris, Pid or Chuck could verify this, but I think I'm correct here.
>
> Do you have the proper .jar file in the correct folder?
>
> -----Original Message-----
> From: pablo.a.saavedra@gmail.com [mailto:pablo.a.saavedra@gmail.com]
> Sent: Thursday, February 17, 2011 3:35 PM
> To: users@tomcat.apache.org
> Subject: Issue with JNDI datasources in Tomcat 6
>
> Hi,
>
> I'm trying to use JNDI datasources in Tomcat 6, using global naming
> resources. My setup is identical to this one:
>
>
> http://pro-programmers.blogspot.com/2008/07/spring-datasource-jndi-lookup-from.html
>
> But I keep getting null when doing the lookup. I debugged the code a little
> and the problem seems to be that the entry for the datasource  in the naming
> context does not have an address element. Any tip as to what I might be
> doing wrong?
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Issue with JNDI datasources in Tomcat 6

Posted by "Propes, Barry L " <ba...@citi.com>.
You said you set that up exactly as done in the link below, and the link below shows this near the top:

Figure: Tomcat 5.5 directory structure
DB_Driver.jar

Question - if you're on Tomcat 6 series, why are you configuring to the 5.5 specs? I'm thinking they're done a bit differently.

Maybe Chris, Pid or Chuck could verify this, but I think I'm correct here.

Do you have the proper .jar file in the correct folder?

-----Original Message-----
From: pablo.a.saavedra@gmail.com [mailto:pablo.a.saavedra@gmail.com]
Sent: Thursday, February 17, 2011 3:35 PM
To: users@tomcat.apache.org
Subject: Issue with JNDI datasources in Tomcat 6

Hi,

I'm trying to use JNDI datasources in Tomcat 6, using global naming resources. My setup is identical to this one:

http://pro-programmers.blogspot.com/2008/07/spring-datasource-jndi-lookup-from.html

But I keep getting null when doing the lookup. I debugged the code a little and the problem seems to be that the entry for the datasource  in the naming context does not have an address element. Any tip as to what I might be doing wrong?

Thanks.

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