What's supposed to happen when the test button is pressed and everything is
OK? I only get a message when there is an error. No positive response.
Jim Gillaspy
Director of Information Systems
CMD Services, Inc.
[EMAIL PROTECTED]
678-475-2030
-----Original Message-----
From: Anthony T. DeBonis [SMTP:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 3:23 PM
To: JRun-Talk
Subject: RE: DataSource error
Did you enter the PW in the JMC for the ODBC entry & does it test out with
the test button?
-----Original Message-----
From: Jim Gillaspy [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 10:48 AM
To: JRun-Talk
Subject: DataSource error
Can anyone give me some insight into the following error?
javax.servlet.ServletException: Invalid authorization specification: Access
denied for user: '[EMAIL PROTECTED]' (Using password: YES)
trying to open a JRun datasource with the following code:
String dsName = "thedata"; // the datasource name in the JRun console
public Connection getConnection()
throws SQLException, Exception, ServletException
{
Connection con = null;
try
{
// new code to use datasource from JRun
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/" +
dsName);
con = ds.getConnection("login","thepassword");
// also tried with con = ds.getConnection();
if (con == null)
{
throw new ServletException("sqlquery, connection is null for
"+dsName;
}
} catch (SQLException e1)
{
throw new ServletException(e1.getMessage()+" SQLException in
sqlquery get connection");
} catch (Exception e2)
{
throw new ServletException(e2.getMessage()+" Exception in
sqlquery get connection");
}
return con;
} // end getConnection()
Jim Gillaspy
Director of Information Systems
CMD Services, Inc.
[EMAIL PROTECTED]
678-475-2030
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists