Skip to Content.
Sympa Menu

freetds - RE: coding problem or JDK problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Jeff Fisher <JFisher AT Emery-Waterhouse.com>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: RE: coding problem or JDK problem
  • Date: Fri, 23 Feb 2001 12:15:07 -0500


I had some problems using jdk 1.2 until I pulled down one of the snapshots
and used it. Now everything seems to work fine. This may be the same
problem your having.

If you have pulled down just the jar file, I think it only works with JDK
1.1.

Jeff
-----Original Message-----
From: Laurent BRUYNOOGHE [mailto:lbruynooghe AT compubase-europe.com]
Sent: Friday, February 23, 2001 12:10 PM
To: TDS Development Group
Subject: [freetds] coding problem or JDK problem


Hi,

I try to use freetds_jdbc driver and i have problem.

I am using JBuilder 4 with JDK 1.3.0-C

this is the source code :


import java.sql.*;
import java.io.*;

public class t0001
{
static public void main(String args[])
throws SQLException, java.lang.ClassNotFoundException, IOException
{
boolean passed = true;

System.out.println ("Connexion au serveur");

// open the database
int count = 0;

Class.forName("com.internetcds.jdbc.tds.Driver");

String url =
"jdbc:freetds:sqlserver://SERVER_NAME/DatabaseTest";
String user = "user";
String password = "password";

try
{
Connection cx = DriverManager.getConnection(url, user, password);
}

catch(java.sql.SQLException ex)
{
System.out.println("EXCEPTION2 : " + ex.getMessage());
ex.printStackTrace();
System.exit(1);
}
System.out.println (6);

System.out.println ("Connexion etablie");
}


And i have an exception that i can't solve.
I wonder if i have a JDK problem.


Java console printing :

Connexion au serveur
EXCEPTION2 : null
Exception- java.lang.NullPointerException
java.sql.SQLException
at
com.internetcds.jdbc.tds.Constructors.newConnection(Constructors.java:305)
at com.internetcds.jdbc.tds.Driver.connect(Driver.java:257)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at t0001.main(t0001.java:33)


Can you help me ?

Thanks a lot for your response.

Laurent BRUYNOOGHE

Visit our new web site : http://www.compubase-europe.com !

e-mail:lbruynooghe AT compubase-europe.com
tel : 01 69 47 27 11

compuBase
8-10 rue du Bois Sauvage
91055 Evry FRANCE


---
You are currently subscribed to freetds as: [jfisher AT emery-waterhouse.com]
To unsubscribe, forward this message to
$subst('Email.Unsub')




Archive powered by MHonArc 2.6.24.

Top of Page