wood burning stoves 2.0*
The moose likes JDBC and the fly likes Exception DominoDriver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Exception DominoDriver" Watch "Exception DominoDriver" New topic
Author

Exception DominoDriver

Benjamin Gast
Greenhorn

Joined: May 06, 2004
Posts: 4
Hello!
I`m trying to get a connection to a Domino Database with WSAD 5. I`m new and I don`t know why he doesn`t found the class.
I get this error message:
ClassNotFoundExecption: lotus.jdbc.domino.DominoDriver
and then when I print out the con : No suitable driver

Here is my Code where I have my Problem:

Connection con;
Statement stmt;
ResultSet rs;
ResultSetMetaData rsmd = null;
String name;
String sql = "SELECT * FROM Employees";
String connStr = "jdbcomino:/JdbcDemo.nsf/local";
response.getWriter().println(connStr+ "<br>");
java.text.DecimalFormat moneyForm = new java.text.DecimalFormat("##,###.##");

try {
try {
Class.forName("lotus.jdbc.domino.DominoDriver"); }
catch (ClassNotFoundException e) {
response.getWriter().println("ClassNotFoundExecption: " + e.getMessage()+"<br>");
}

I added the JdbcDomino.jar to my Libary. Printing the Code lotus.jdbc.domino.DominoDriver works fine. So I think he should find the Class. I also added the CLASSPATH to my System.

Thanks for help!

[ November 11, 2004: Message edited by: Benjamin Gast ]

[edited to disable smilies]
[ November 11, 2004: Message edited by: Jeanne Boyarsky ]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

Benjamin,
The no suitable driver message is just a symptom of the class not found problem. I suspect this is an IDE configuration issue.

WSAD has two paths: a compile time path and a runtime path. The compile time path (properties->build path) is used at compile time. This is probably what you set when you say you set the classpath. The runtime path (properties->java jar dependencies) is used at runtime and is often responsible for class not found errors.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Benjamin Gast
Greenhorn

Joined: May 06, 2004
Posts: 4
THX
I found the problem. I importet the JDBCDomino.jar in my lib folder in the project. Now it works.
 
Don't get me started about those stupid light bulbs.
 
subject: Exception DominoDriver