![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to do a simple connection in JBuilder to a ASA 8 DB: CLASSPATH=C:\Program Files\Sybase\Shared\jConnect-5_5\classes\jconn2.jar --------- import java.sql.*; static public void main(String[] args) { try { Class.forName("ianywhere.ml.jdbcodbc.IDriver"); } catch (java.lang.ClassNotFoundException e) { System.err.print("ClassNotFoundException:"); System.err.println(e.getMessage()); } Connection conn; try { String url = "jdbc dbc:dbn=exLibrisDB";conn = DriverManager.getConnection(url, "dba", "sql"); System.err.println("Hello World"); } catch (SQLException e) { System.err.print("SQLException:"); System.err.println(e.getMessage()); } ... } ---------------------------- Error Messages: C:\JBuilder9\jdk1.4\bin\javaw -classpath "C:\JBuilder9\samples\Welcome \classes;C:\JBuilder9\lib\dx.jar;C:\JBuilder9\lib\ beandt.jar;C:\JBuilder9 \jdk1.4\demo\jfc\Java2D\Java2Demo.jar;C:\JBuilder9 \jdk1.4\demo\plugin\jfc \Java2D\Java2Demo.jar;C:\JBuilder9\jdk1.4\jre\lib\ charsets.jar;C: \JBuilder9\jdk1.4\jre\lib\ext\dnsns.jar;C:\JBuilde r9\jdk1.4\jre\lib\ext \ldapsec.jar;C:\JBuilder9\jdk1.4\jre\lib\ext\local edata.jar;C:\JBuilder9 \jdk1.4\jre\lib\ext\sunjce_provider.jar;C:\JBuilde r9\jdk1.4\jre\lib\im \indicim.jar;C:\JBuilder9\jdk1.4\jre\lib\jaws.jar; C:\JBuilder9\jdk1.4\jre \lib\jce.jar;C:\JBuilder9\jdk1.4\jre\lib\jsse.jar; C:\JBuilder9\jdk1.4\jre \lib\rt.jar;C:\JBuilder9\jdk1.4\jre\lib\sunrsasign .jar;C:\JBuilder9 \jdk1.4\lib\dt.jar;C:\JBuilder9\jdk1.4\lib\htmlcon verter.jar;C:\JBuilder9 \jdk1.4\lib\tools.jar" com.borland.samples.welcome.WelcomeApp ClassNotFoundException:ianywhere.ml.jdbcodbc.IDriv er SQLException:No suitable driver I am wondering why it can't find ianywhere.ml.jdbcodbc.IDriver and why C:\Program Files\Sybase\Shared\jConnect-5_5\classes\jconn2.jar doesn't show up in the ClassPath. |
#3
| |||
| |||
|
|
You have not given enough information to connect. The key missing item is which ODBC driver to use. |
#4
| |||
| |||
|
|
You have not given enough information to connect. The key missing item is which ODBC driver to use. |
#5
| |||
| |||
|
|
I am trying to do a simple connection in JBuilder to a ASA 8 DB: |
|
CLASSPATH=C:\Program Files\Sybase\Shared\jConnect-5_5\classes\jconn2.jar |
|
I am wondering why it can't find ianywhere.ml.jdbcodbc.IDriver |
#6
| |||
| |||
|
|
Thom Lamb [ISUG] wrote: I am trying to do a simple connection in JBuilder to a ASA 8 DB: Are you trying to create a connection for MobiLink? If not, then the class "ianywhere.ml.jdbcodbc.IDriver" is likely not what you want to use. CLASSPATH=C:\Program Files\Sybase\Shared\jConnect-5_5\classes\jconn2.jar This may be set in your environment, but is it set in your JBuilder project? According to the classpath being dumped out in the error message, it apparently isn't. This is a JBuilder configuration issue. I am wondering why it can't find ianywhere.ml.jdbcodbc.IDriver If you look in %ASANY9%\java, you will find a number of JAR and ZIP files relating to Java and ASA. jodbc.jar contains the above class, but be sure this class is really what you are looking for. Hope this helps, greg.fenton -- Greg Fenton Consultant, Solution Services, iAnywhere Solutions -------- Visit the iAnywhere Solutions Developer Community Whitepapers, TechDocs, Downloads http://www.ianywhere.com/developer/ |
![]() |
| Thread Tools | |
| Display Modes | |
| |