tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim V. Korovinsky" <va...@veltech.com>
Subject javax.naming.NameNotFoundException: Name java: is not bound in this Context
Date Tue, 14 Dec 2004 11:05:06 GMT

Hello,

Please, help me.
I have an application installed on Tomcat 5.
It was working properly until I append the second host and deployed
this application on it. Now I have "localhost" and "myhost" as
default.
And here is a problem: application works correctly on the "localhost" and at
the "myhost" exception occured during database access:

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

at this place: Context envContext  = (Context)initial.lookup("java:/comp/env");

server.xml:

<Engine defaultHost="www.myhost.com" name="Catalina">
  <Host appBase="webapps" name="localhost">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
  </Host>
  <Host appBase="myhost" name="www.myhost.com">
    <Alias>myhost.com</Alias>
    <Alias>stage.myhost.com</Alias>
  </Host>
  <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt"
timestamp="true"/>
  <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
</Engine>

myapp.xml:

<Context displayName="MYAPP" docBase="myapp" path="/myapp"
workDir="work/Catalina/www.myhost.com/myapp">
  <Resource auth="Container" description="Puzzles DB" name="jdbc/mydatasource" type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/mydatasource">

Thank you.

-- 
Best regards,
Vadim                          mailto:vadim@veltech.com


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


Mime
View raw message