Uploaded image for project: 'Apache Trafodion'
  1. Apache Trafodion
  2. TRAFODION-2676

JDBC T2Sample.java test program does not have log after making connection

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: client-jdbc-t2
    • Labels:
      None

      Description

      T2Sample.java coded to load driver class and make a connection, printing msg after each successful step.
      Pgm ends without notice when attempting .getConnection(url)

      (This is one of our regression test programs?) source included here for your convenience.

      import java.sql.*;
      import java.math.BigDecimal;

      public class T2Sample
      {
      public static void main(String args[])
      {

      Connection connection;
      Statement stmt;
      PreparedStatement pStmt;
      ResultSet rs;
      DatabaseMetaData dbMeta;
      int rowNo;

      try

      { Class.forName("org.apache.trafodion.jdbc.t2.T2Driver"); System.out.println("Class loaded"); }

      catch (Exception e)

      { e.printStackTrace(); System.out.println(e.getMessage()); return; }
      try
      { //String url = "jdbc:default:connection"; String url = "jdbc:t2jdbc:"; System.out.println("Opening connection..."); connection = DriverManager.getConnection(url); System.out.println("Successfully connected"); }
      catch (Exception e)
      { e.printStackTrace(); System.out.println(e.getMessage()); return; }

      }
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kevinxu021 Kevin Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: