Hello,
I'm trying to create a web-app that connects to a Lotus Domino server. I've downloaded and installed the driver from IBM and follow the setup in there docs, yet I still cannot even load the driver. I've searched this forum only to find many people with the same issue and no real solutions. I've placed the JdbcDomino.jar in the CLASSPATH of the system variables (even though web-applications don't use these i believe). I've also placed the jar, cab and dll's that came with the IBM dowload into my WEB-INF/lib directory. Here is my code with no success. Please help before I cry. Thanks!
<%@ page import="java.util.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="lotus.jdbc.domino.*"%>
<%
String sql = "SELECT * FROM Employees";
String connStr = "jdbc:domino:/JdbcDemo.nsf";
Connection con = null;
ResultSet rs = null;
Statement st = null;
try {
out.println("Loading driver\n");
Class.forName("lotus.jdbc.domino.DominoDriver");
con = DriverManager.getConnection(connStr,"","");
st = con.createStatement();
rs = st.executeQuery(sql);
out.println("Executing... " + sql);
out.println();
while(rs.next())
out.println(rs.getString(1));
st.close();
con.close();
}
catch (ClassNotFoundException e) {
out.println("ClassNotFoundExecption: " + e.getMessage()+"\n");
}
catch (Exception e) {
out.println(e.getMessage());
}
java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:141)
org.apache.jsp.test_jsp._jspService(test_jsp.java:71)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)