jlaskowski    2004/07/27 13:42:49

  Modified:    modules/core/src/java/org/openejb/resource/jdbc
                        JdbcManagedConnectionFactory.java
  Log:

  Small (and hopefully useful) improvement to error messages when JDBC driver testing 
fails
  
  Revision  Changes    Path
  1.4       +6 -5      
openejb1/modules/core/src/java/org/openejb/resource/jdbc/JdbcManagedConnectionFactory.java
  
  Index: JdbcManagedConnectionFactory.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb1/modules/core/src/java/org/openejb/resource/jdbc/JdbcManagedConnectionFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JdbcManagedConnectionFactory.java 7 Jul 2004 23:29:36 -0000       1.3
  +++ JdbcManagedConnectionFactory.java 27 Jul 2004 17:42:49 -0000      1.4
  @@ -86,10 +86,11 @@
           try{
               physicalConn = DriverManager.getConnection(jdbcUrl, defaultUserName, 
defaultPassword);        
           }catch(Throwable e){
  -            logger.error("Testing driver failed.  "+
  -                         "["+jdbcUrl+"]  "+
  -                         "Could not obtain a physical JDBC connection from the 
DriverManager.  "+
  -                         e.getMessage());
  +            logger.error("Testing driver failed.  " + "[" + jdbcUrl + "]  "
  +                    + "Could not obtain a physical JDBC connection from the 
DriverManager."
  +                    + "\nThe error message was:\n" + e.getMessage() + "\nPossible 
cause:"
  +                    + "\n\to JDBC driver classes are not available to OpenEJB"
  +                    + "\n\to Relative paths are not resolved properly");
           } finally {
               try{
                   physicalConn.close();
  
  
  

Reply via email to