Skip to Content.
Sympa Menu

freetds - Re: java.sql.SQLException on Connection creation

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Greg Chakmakian <gregchak AT mac.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: java.sql.SQLException on Connection creation
  • Date: Sat, 18 Aug 2001 00:37:31 -0400

I ran the app that you sent me and it had a lot of problems with the freetds_jdbc.jar file. Sometimes it said command not found, sometimes, file not found, sometimes permission denied. Here's a sample of what I got when I ran the app:

/Library/Tomcat/lib/freetds/freetds_jdbc.jar: command not found: ^A [2004]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2087]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2088]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: command not found: ^A^U^A] [2089]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2090]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2091]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2092]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2093]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2094]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2095]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: command not found: *^[,^P]^B\M-7^A(\M-1 [2097]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: command not found: ^A\M-^F [2097]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: permission denied: [2098]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2099]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: command not found: ^A [2100]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: command not found: ^A\M-^F [2100]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2101]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: command not found: ^A^U^A^T [2102]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2103]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: permission denied: [2104]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: permission denied:
[2105]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: parse error near `)' [2106]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: permission denied: [2107]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: no such file or directory: ^U~/ [2107]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: no such file or directory: Z:/cts/freetds_jdbc/com/internetcds/jdbc/tds/PreparedStatement_base.class [2108]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: no such file or directory: Z:/cts/freetds_jdbc/com/internetcds/jdbc/tds/PreparedStatement_base.class [2109]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: no such file or directory: Z:/cts/freetds_jdbc/com/internetcds/jdbc/tds/PreparedStatement_base.class [2110]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: no such file or directory: Z:/cts/freetds_jdbc/com/internetcds/jdbc/tds/PreparedStatement_base.class [2111]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: no such file or directory: Z:/cts/freetds_jdbc/com/internetcds/jdbc/tds/PreparedStatement_base.class [2112]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: no such file or directory: Z:/cts/freetds_jdbc/com/internetcds/jdbc/tds/PreparedStatement_base.class [2113]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: no such file or directory: Z:/cts/freetds_jdbc/com/internetcds/jdbc/tds/PreparedStatement_base.class [2114]
/Library/Tomcat/lib/freetds/freetds_jdbc.jar: no such file or
directory: Z:/cts/freetds_jdbc/com/internetcds/jdbc/tds/PreparedStatement_base.class [2115]

I have the file open for read and write for everyone. Do I have a bad jar file? Could you send me the one you use?

-greg


On Friday, August 17, 2001, at 09:04 AM, Jim Urban wrote:

 java -classpath .;\FreeTDS\freetds_jdbc.jar TestFreeTDS
On Friday, August 17, 2001, at 09:04 AM, Jim Urban wrote:

Greg,
 
Attached is a standalone Java app you can test with.  You will need to make a couple of quick changes to it:
 
1. Change the line String url ="jdbc:freetds:sqlserver://localhost/mydatabase"; to point to the your database server and database.
 
2.  Replace the literal with a valid DB id in the line:  String login = "USERID";.

3.  Replace the literal with a valid DB password in the line:  .   String password = "PASSWORD";.
Then recompile the program: javac TestFreeTDS.java.

Run the program:  java -classpath .;\FreeTDS\freetds_jdbc.jar TestFreeTDS (be sure to set your classpath correctly). 
 
Good luck!
 
Jim Urban
Product Manager
Netsteps Inc.
Suite 505E
1 Pierce Pl.
Itasca, IL  60143
Voice:  (630) 250-3045 x2164
Fax:  (630) 250-3046

 
 

-----Original Message-----
From: bounce-freetds-134788 AT franklin.oit.unc.edu [mailto:bounce-freetds-134788 AT franklin.oit.unc.edu]On Behalf Of Leon Chakmakian
Sent: Thursday, August 16, 2001 10:17 PM
To: TDS Development Group
Subject: [freetds] Re: java.sql.SQLException on Connection creation

Okay, so here's my status. I tried the snapshot.jar file and I got a different error: No suitable driver found. I later tried re-downloading the file again just to make sure I didn't get a corrupt copy of the file and that didn't work. I tried to make a standalone java app, but I'm not sure how to do that; I come from a JSP type of application background. If you could send me a small sinipit of code to try out as a java app, I could test it that way. I feel like I'm doing something wrong that is really simple. I'm using Tomcat as my JSP engine and have the jar file in my tomcat/lib directory with is specified in my path. Any other ideas? Further below is the error I am getting

-greg



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)




On Thursday, August 16, 2001, at 09:24 AM, Curt Hagenlocher wrote:

Should I be using the freetds_jdbc.snapshot.jar file
instead?


Yes, probably, though I don't know that it would make a difference
in this case.

I'm not really sure where to go next.
I haven't tried it outside of my JSP environment mainly because I
don't have anything to try it out on. Any ideas?


Create a small source file with a main() function that does
nothing more than try to make a connection. Build that and
try to run it outside the JSP context and see if you get the
same error.

Which JSP environment are you using?

--
Curt Hagenlocher
curt AT hagenlocher.org

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

Attachment: TestFreeTDS.java
Description: Binary data

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



Archive powered by MHonArc 2.6.24.

Top of Page