error in set datasource in RAD 6.0, the testing server is Webspere protal server 5.0.

lilyyan
lilyyan used Ask the Experts™
on
Hello,

I'm trying to set up a DB2 pool connection by using a datasource.  I have set up the DB2 datasource in RAD 6.0, the testing server is Webspere protal server 5.0.

i got an errror is:

javax.naming.NameNotFoundException: Name "comp/env/MYtestDB" not found in context "java:"

the code for retrieve datasource is: datasource = (javax.sql.DataSource) ctx.lookup("java:comp/env/MYtestDB");

is there someting missing? this is my first time that i'm using datasource

Thanks very much for your reply,

lilyyan
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Try "java:comp/env/jdbc/MYtestDB" or maybe just "jdbc/MYtestDB".

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial