You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jerry Malcolm <2n...@gmail.com> on 2011/12/05 00:25:07 UTC

Name comp is not bound in this Context

I'm currently migrating from Tomcat 5.5 to 7.0.  I have everything pretty
much running now.  But I have one webapp that has run fine for years on
5.5, but will not run on 7.0.  I get the following error message:
javax.naming.NameNotFoundException: Name comp is not bound in this Context.

It occurs inside a servlet that autoruns on startup.  I'm trying to access
a datasource resource statement defined in the context.

The weird thing is that I copied that same app to another host on the same
server, and it works fine.

I'm stuck... any ideas what might be causing this message?

Thanks.

Jerry

Re: Name comp is not bound in this Context

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/12/5 Jerry Malcolm <2n...@gmail.com>:
> I'm currently migrating from Tomcat 5.5 to 7.0.  I have everything pretty
> much running now.  But I have one webapp that has run fine for years on
> 5.5, but will not run on 7.0.  I get the following error message:
> javax.naming.NameNotFoundException: Name comp is not bound in this Context.
>
> It occurs inside a servlet that autoruns on startup.  I'm trying to access
> a datasource resource statement defined in the context.
>
> The weird thing is that I copied that same app to another host on the same
> server, and it works fine.
>
> I'm stuck... any ideas what might be causing this message?
>

1. What exact version of 7.0.x on both servers?
2. What is in server.xml and in context XML file for your web
application? Is the resource defined there? (If that does not help,
remove comments and passwords and post the files here).
You must have META-INF/context.xml file in your application either
with Resource or with ResourceLink element.
You may compare configuration files between the servers. The JDBC
driver jar from your database vendor - is it present on both?
3. Any errors or warnings logged during Tomcat startup and webapp startup?

Best regards,
Konstantin Kolinko

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