tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Vandyck <av...@ressource-toi.org>
Subject [T4.1] java:comp is not bound in this context...
Date Fri, 19 Aug 2005 09:07:55 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[Tomcat 4.1.31; Debian GNU/Linux Sarge]

Hi all,

I googled around and find someone with the same problem:
http://marc.theaimsgroup.com/?l=tomcat-user&m=110151992910727&w=2

... but I can't find an answer.

I also have a Realm configured using the DataSource and it works! But I
can't get an InitialContext. And hibernate does not find the datasource
but can connect to the MySQL database if I pass all the parameters
(driver, url, user and pass instead of the datasource).

Also, (maybe you won't beleive me) but I'm sure it used to work! :-D
What the hell did I changed to break this?!

In my configuration file:
server.xml:
I have a global resource, I have these resources in the context, I have
another resource in the context (not a reference), I can't call none of
them.

If I do:
Context ctx = new InitialContext();
log ("Name in manespace: " + ctx.getNameInNamespace());

I have an exception:
Can't generate an absolute name for this namespace

If I do:
DataSource dataSource = (DataSource)
ctx.lookup("java:comp/env/jdbc/tobydb");

I have also an exception:
Name java:comp is not bound in this Context

If anyone can help on this...

Many thanks,

- --
Arnaud <http://www.ressource-toi.org>
Java Trap: http://www.gnu.org/philosophy/java-trap.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDBaFr4vzFZu62tMIRAoz8AJ9pSElEy9wj5zwZFIrEXXo3+3TqHwCcDqYw
CbbylLjZqzRcTb0pIrgNAh4=
=DOHB
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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