Skip to Content.
Sympa Menu

freetds - Re: problem creating new connection with FreeTDS_JDBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Ian Struble" <iks AT callwave.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: problem creating new connection with FreeTDS_JDBC
  • Date: Thu, 13 Jul 2000 09:31:52 -0700



> On Tue, 11 Jul 2000, Ian Struble wrote:
>
> >
> >
> > > On Tue, 11 Jul 2000, Ian Struble wrote:
> > >
> > > > Class.forName("com.internetcds.jdbc.tds.Driver");
> > > > con =
> > > >
> >
DriverManager.getConnection("jdbc:freetds:sqlserver://sql.foo.com/Testing",
> > > > "test_user", "test_password");
> > > >
> > > > And here is a little bit of the stack trace:
> > > >
> > > > 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(Unknown Source)
> > >
> > > That stack trace is from a re-thrown exception. Try sticking in an
> > > e.printStackTrace() in the catch statements just below line 305 in
> > > Constructors.java and see what you get.
> >
> > Thanks Bob. I threw it in and then also tried trowing it in a couple
other
> > places. The only new information was from putting it above line 305(a
new
> > exception is thrown on line 305 so below won't do much :^). This is
what
> > I've got now:
> >
> > java.lang.NullPointerException
> > at
> >
com.internetcds.jdbc.tds.Constructors.newConnection(Constructors.java:296)
> > at com.internetcds.jdbc.tds.Driver.connect(Driver.java:257)
> > at java.sql.DriverManager.getConnection(Unknown Source)
> > at java.sql.DriverManager.getConnection(Unknown Source)
> > at BasicServlet.doGet(BasicServlet.java:49)
> >
> > And here is what line 296 is:
> > public static java.sql.Connection newConnection
> > // ... snip ...
> > return (java.sql.Connection)connectionCtor.newInstance(params);
> > // line 296 ^^^^^^^^^^^^
>
> Hmm... The connectionCtor is null. Are you using the same version of
> the JDK on your two systems?

I'm pretty sure that I am dealing with 1.1.8 on both machines but I will
double check that. For now I have just told people to continue with a
JDBC-ODBC bridge if they really need to run stuff on their NT workstations.
Otherwise since the unix box is the production machine I have just tabled
this for the next week or so. If I do discover what the problem was I will
mail the list.

Ian






Archive powered by MHonArc 2.6.24.

Top of Page