JNDI Issue with Tomcat

View: New views
4 Messages — Rating Filter:   Alert me  

JNDI Issue with Tomcat

by Hanmay Udgiri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
I have implemented datasource using JNDI look up.
The code work fine If I call the code during any User action.
But If try to call the same code during the tomcat server start up I get an
exception

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

I am using Tomcat 5.5 and Oracle 9

--
Thanks and Regards
Hanmayya Udgiri

Re: JNDI Issue with Tomcat

by Christopher Schultz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hanmay,

Hanmay Udgiri wrote:
| I have implemented datasource using JNDI look up.
|
| The code work fine If I call the code during any User action.
| But If try to call the same code during the tomcat server start up I
get an
| exception
|
| javax.naming.NameNotFoundException: Name comp is not bound in this Context

Care to post your code? Where is it running? In a
ServletContextListener, or some other place?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgrGvkACgkQ9CaO5/Lv0PB4FgCgp8b8ohvKWIl/rrmet0Kry5LT
CrgAnRl1DDdmH4/zwUn7yQsvV94A6MTg
=ty5M
-----END PGP SIGNATURE-----

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


Re: JNDI Issue with Tomcat

by Hanmay Udgiri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using JNDI look for connection pooling.
We have a ITSMain class which uses MBeanServer to load the classes.
This class has a ServiceManager class which load all start up services and
initializes it.
During this we have Connection pooling class which uses JNDI look up.
So I am getting below exception If I set my JNDI class to initialize at
start up.
But If I don't set my class to initialize at server start up,Then I don't
get any exception.

Thanks and Regards
Hanmaya


On Wed, May 14, 2008 at 10:31 PM, Christopher Schultz <
chris@...> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hanmay,
>
> Hanmay Udgiri wrote:
> | I have implemented datasource using JNDI look up.
> |
> | The code work fine If I call the code during any User action.
> | But If try to call the same code during the tomcat server start up I
> get an
> | exception
> |
> | javax.naming.NameNotFoundException: Name comp is not bound in this
> Context
>
> Care to post your code? Where is it running? In a
> ServletContextListener, or some other place?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkgrGvkACgkQ9CaO5/Lv0PB4FgCgp8b8ohvKWIl/rrmet0Kry5LT
> CrgAnRl1DDdmH4/zwUn7yQsvV94A6MTg
> =ty5M
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Thanks and Regards
Hanmayya Udgiri

Re: JNDI Issue with Tomcat

by Christopher Schultz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hanmaya,

Hanmay Udgiri wrote:
| So I am getting below exception If I set my JNDI class to initialize at
| start up.

How do you set your class to initialize at startup? Be specific.

Care to post the code you use to fetch the JNDI DataSource?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgsWIwACgkQ9CaO5/Lv0PB8cwCggzZ5Ng00rUl5qvVZhwaniYTE
720AoI9onfiNJKcvTRZiTqkGtwrsS01o
=UYc0
-----END PGP SIGNATURE-----

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