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

Reply via email to