6 messages in com.mysql.lists.javaRe: JDBC with Java 2 and MySQL| From | Sent On | Attachments |
|---|---|---|
| Atul Ohri | 18 Jun 1999 09:56 | |
| Kolasani, Hari | 18 Jun 1999 10:08 | |
| Terrence W. Zellers | 18 Jun 1999 10:17 | |
| Kazys | 18 Jun 1999 10:35 | |
| Atul Ohri | 18 Jun 1999 11:14 | |
| Atul Ohri | 18 Jun 1999 11:16 |
| Subject: | Re: JDBC with Java 2 and MySQL![]() |
|---|---|
| From: | Kazys (webm...@junet.net) |
| Date: | 06/18/1999 10:35:43 AM |
| List: | com.mysql.lists.java |
Hello,
I was having problems with TWZ driver and Java 2 (v1.2.1) application. mm driver (org.gjt.mm.mysql.Driver) works just fine for me. maybe you should try mm instead TWZ?
best regards
Kazys Jocionis webmaster http://www.junet.net
Atul Ohri wrote:
I am attempting to write a Java program to access my MySQL Database but am having a lot of difficulty.
I am using the TWZ driver and Java 2 (v1.2) - that is the problem I think because I know there is an incompatiblity issue. I want to use 1.2 instead of 1.1 if possible so if someone could please help me out I'd appreciate it.
UNIX Version: Digital UNIX V4.0D (Rev. 878) MySQL Version: 3.22.22
I have tried all types of ways to get the driver to work, including making my CLASSPATH the following: . (current dir) .:twz1/noopt twz1/jdbc/mysql twz1/noopt etc . . .
Currently, since I am just testing, the twz1 directory is a subdirectory off of the directory where my .java files are located. These are all the different ways I tried to get my program working:
1) I tried: Class.forName("twz1.jdbc.mysql.jdbcMysqlDriver"); and that gives the following error while RUNNING the successfully compiled program: Exception in thread "main" java.lang.VerifyError: (class: twz1/jdbc/mysql/jdbcMysqlBase, method: isMultipleQuery signature: (Ltwz1/jdbc/mysql/jdbcMysqlConnex;)Z) Illegal use of nonvirtual function call at twz1.jdbc.mysql.jdbcMysqlDriver.<clinit>(jdbcMysqlDriver.java) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Compiled Code) at Connect.main(Compiled Code)
2) I tried: DriverManager.registerDriver(DriverManager.getDriver("twz1.jdbc.mysql.jdbcMysq lDriver")); and that gives the following error while RUNNING the successfully compiled program: Message: No suitable driver SQLState: 08001 ErrorCode: 0
3) And I tried: Driver mysql = (Driver) new twz1.jdbc.mysql.jdbcMysqlDriver(); DriverManager.registerDriver( mysql ); and got the following error while COMPILING: ./twz1/jdbc/mysql/jdbcMysqlDriver.java:105: class twz1.jdbc.mysql.jdbcMysqlConnex is an abstract class. It can't be instantiated. jdbcMysqlConnex cx = new jdbcMysqlConnex(baseURL); ^
And I even tried adding .newInstance() to Class.forName(...) but that didn't work because certain exceptions had to be caught. Besides, even if I did need .newInstance(), it would at least successfully load the driver and then fail later on in the program.
The workaround that was mentioned by TWZ about making the CLASSPATH twz1/noopt didn't work either. I know that this is the part of my code that is not working so I won't paste my whole code here because it never gets past the few lines of code that are trying to load the driver.
Thanks
Atul Ohri ohr...@link.law.nyu.edu NYU Law School Webteam
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail java...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail java...@lists.mysql.com instead.




