Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception DominoDriver

 
Benjamin Gast
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34423
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Benjamin Gast
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THX
I found the problem. I importet the JDBCDomino.jar in my lib folder in the project. Now it works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic