Hi,
I don't have a great deal of experience using
Tomcat, but have come across a weird problem that I can't solve.
I'm using Tomcat 6.0.26 with eclipse Galileo
JEE edition.
I've configured a Datasource according to the Tomcat docs, as follows:
under the Servers folder created in eclipse, in the context.xml file I have added:
and in the web.xml of the web project I have added:
I look up the datasource from a
servlet as follows:
The DB driver jar files have been placed under WEB-INF/lib.
When running this I get the (root) exception of
However, if I remove the jdbc/ from all of the occurrences of the JNDI name shown above, the lookup and the subsequent connections to the DB work fine!
i.e.
I don't really want to the leave the servlet code this way, since it can be used on other app servers as well (it's used for demo's), where 'jdbc/db2conn' works no problem.
I've google'd for hours and can't find a mention of this anywhere.
Anyone have any ideas?
Thanks
Mark.