I am using WSAD 5.1.0 and when i tried to explore the JNDI with a simple
JSP page, which connects to a SQLServer database and displays records from a table,
the JSP page is producing the expected result - displaying records. But in the server's console window, I am seeing the following error message:
"Resource reference jdbc/ds1 could not be located, so default values of the following are used: [Resource-ref settings]".
*********************************************************************
And the code snippet goes here:
*********************************************************************
<%
Statement stmt = null;
InitialContext ctx = null;
DataSource ds = null;
Connection con = null;
try {
ctx = new InitialContext();
ds = (DataSource)ctx.lookup("jdbc/ds1");
}
catch (Exception e) {
System.out.println( e.toString() );
}
try {
con = ds.getConnection("userid", "password");
stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(
"select * from stocks");
%>
*********************************************************************
Eventhough i get the results, i need to get rid of this error.
Need your help on what is causing this.
Attached is the data source settings' image.
Thanks and regards,
Renuka