How to Test the JNDI Java class using ANT
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, May 11, 2007 03:59 AM

hi, We have an application which runs in TOMCAT on UNIX platform. In that i wrote a new method in a DispatchAction which uses DB operations class. The DB connection is done using JNDI look. The application is running fine and code i wrote is also running fine. Now the problem is: i wrote a MockStrutsTestCase to test that method. Main thing is I have to test that method using ant. For that i wrote a target and set necessary jars files in classpath for that target in build.xml. Testclass was compiled and while running it is giving NamingException at DataSource ds = (DataSource) ctx.lookup(lookupStr);    More>>

hi,



We have an application which runs in TOMCAT on UNIX platform.



In that i wrote a new method in a DispatchAction which uses DB operations class. The DB connection is done using JNDI look. The application is running fine and code i wrote is also running fine.



Now the problem is:



i wrote a MockStrutsTestCase to test that method. Main thing is I have to test that method using ant.


For that i wrote a target and set necessary jars files in classpath for that target in build.xml.


Testclass was compiled and while running it is giving NamingException at


DataSource ds = (DataSource) ctx.lookup(lookupStr);


lookupStr value is :: java:comp/env/jdbc/RK


wishing for replies.


Any sugguestions and Responses would be appreciated.


regards,
kalyan.

   <<Less
About | Sitemap | Contact