You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/03 01:49:00 UTC
[jira] [Commented] (TRAFODION-2676) JDBC T2Sample.java test program
does not have log after making connection
[ https://issues.apache.org/jira/browse/TRAFODION-2676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16071844#comment-16071844 ]
ASF GitHub Bot commented on TRAFODION-2676:
-------------------------------------------
Github user kevinxu021 closed the pull request at:
https://github.com/apache/incubator-trafodion/pull/1158
> JDBC T2Sample.java test program does not have log after making connection
> -------------------------------------------------------------------------
>
> Key: TRAFODION-2676
> URL: https://issues.apache.org/jira/browse/TRAFODION-2676
> Project: Apache Trafodion
> Issue Type: Bug
> Components: client-jdbc-t2
> Reporter: Kevin Xu
>
> 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;
> }
> }
> }
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)