I am facing problem as the actual imported java file is not being called. Please have a look of my code :-
import javax.naming.Context;
import javax.naming.InitialContext;
.....
public class ABC{
.....
1. Context lContext = null;
2. ObjectDataSourceFactory lSource = null;
3. try
4. {
5. lContext = new InitialContext();
6. lSource = ((ObjectDataSourceFactory)lContext.lookup(....));
}
catch (Exception e)
{
}
The Problem I am facing here is : when flow control goes into line number 6. it calls the "lookup method" from "SelectorContext.java" but not from "InitialContext.java", I have found this with the help of DEBUGGING mode in eclipse . As a result it cannot find the proper JNDI and gives exception. FYI.. My code is running on Tomcat6. I have set the classpath of jar files from my JRE1.6 and so the JDK.
Can someone please suggest me - how can I know from which JAR this "SelectorContext.java" is being called and how to make it to Look into the InitialContext.class which is present inside RT.JAR, if I am not wrong ?