Posted By:
Chris_Hudson
Posted On:
Friday, November 7, 2003 06:17 AM
Hi, I'm having some problems with WSAD 5.1 trial that don't occur if I use Tomcat 4.1. I have a jdbc datasource configured and tested on the server. I can connect to this datasource by doing ... InitialContext ctx = new InitialContext(); ds = (DataSource) ctx.lookup("jdbc/myOraDB"); However if I try and use a local resource ref and try InitialContext c = new InitialContext(); ds = (DataSource) c.lookup("java:comp/env/jdbc/myOraDB"); I get the error javax.naming.NameNotFoundException: Name "comp/env/jdbc/myOraDB"" not found in context "java:" I have also tried adding a simeple String resour
More>>
Hi,
I'm having some problems with WSAD 5.1 trial that don't occur if I use Tomcat 4.1. I have a jdbc datasource configured and tested on the server. I can connect to this datasource by doing ...
InitialContext ctx = new InitialContext();
ds = (DataSource) ctx.lookup("jdbc/myOraDB");
However if I try and use a local resource ref and try
InitialContext c = new InitialContext();
ds = (DataSource) c.lookup("java:comp/env/jdbc/myOraDB");
I get the error
javax.naming.NameNotFoundException: Name "comp/env/jdbc/myOraDB"" not found in context "java:"
I have also tried adding a simeple String resource environment variable to the web.xml and still get the above error when I try
String temp = (String)initContext.lookup("java:comp/env/tempString");
All of this works fine in tomcat with NO changes to anything.
Has anyone else had any similar problems or can think of anything with the server config I have missed?
<<Less