It cannot find the clas in your classpath. Make sure it is there. You can also put the jar file that contains the jdbcobdc drivers in your /lib folder under your webapps project.
Hope this helps :-) 21/01/2002 10:50:29, rookie jsp <[EMAIL PROTECTED]> wrote: >Hi... >I was trying to use JDBC-ODBC brige for the first >time.According to the documetnation the driver comes >inbuilt with the JSDK2.0 version that I have >installed.That would mean that the following JSP >should work perfectly fine..... >but I am afraid it does'nt .....any ideas ppl ? > ><html> ><body> ><%@ page import="java.io.*" %> ><%@ page import="java.lang.*" %> ><%@ page import="java.sql.*" %> ><%@ page import="javax.servlet.http.*"%> > > ><% >Class.forName("jdbc.odbc.JdbcOdbcDriver"); >String url = "jdbc:odbc:serverName"; >Connection con = DriverManager.getConnection(url, >"user", "passwd"); >java.sql.Statement stmt = con.createStatement(); >ResultSet rs = stmt.executeQuery("SELECT name FROM >santa"); >while (rs.next()) { > String s = rs.getString("name"); > System.out.println("Name = " + s); >} >%> > ></body> ></html> > > >the error dumped on the browser is: >javax.servlet.ServletException: >jdbc.odbc.JdbcOdbcDriver > at >org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown >Source) > at >org.apache.jsp.checkPasswd$jsp._jspService(checkPasswd$jsp.java:100) > at >org.apache.jasper.runtime.HttpJspBase.service(Unknown >Source) > at >javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at >org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown >Source) > at >org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown >Source) > at >org.apache.jasper.servlet.JspServlet.service(Unknown >Source) > at >javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown >Source) > at >org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown >Source) > at >org.apache.catalina.core.StandardWrapperValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invoke(Unknown >Source) > at >org.apache.catalina.core.ContainerBase.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardContextValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invoke(Unknown >Source) > at >org.apache.catalina.core.ContainerBase.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardContext.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardHostValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.valves.ErrorReportValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.valves.AccessLogValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invoke(Unknown >Source) > at >org.apache.catalina.core.ContainerBase.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardEngineValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invoke(Unknown >Source) > at >org.apache.catalina.core.ContainerBase.invoke(Unknown >Source) > at >org.apache.catalina.connector.http.HttpProcessor.process(Unknown >Source) > at >org.apache.catalina.connector.http.HttpProcessor.run(Unknown >Source) > at java.lang.Thread.run(Thread.java:484) > > >root cause > >java.lang.ClassNotFoundException: >jdbc.odbc.JdbcOdbcDriver > at >org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown >Source) > at >org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown >Source) > at >org.apache.jasper.servlet.JasperLoader.loadClass(Unknown >Source) > at >org.apache.jasper.servlet.JasperLoader.loadClass(Unknown >Source) > at >java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:120) > at >org.apache.jsp.checkPasswd$jsp._jspService(checkPasswd$jsp.java:79) > at >org.apache.jasper.runtime.HttpJspBase.service(Unknown >Source) > at >javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at >org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown >Source) > at >org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown >Source) > at >org.apache.jasper.servlet.JspServlet.service(Unknown >Source) > at >javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown >Source) > at >org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown >Source) > at >org.apache.catalina.core.StandardWrapperValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invoke(Unknown >Source) > at >org.apache.catalina.core.ContainerBase.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardContextValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invoke(Unknown >Source) > at >org.apache.catalina.core.ContainerBase.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardContext.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardHostValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.valves.ErrorReportValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.valves.AccessLogValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invoke(Unknown >Source) > at >org.apache.catalina.core.ContainerBase.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardEngineValve.invoke(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invokeNext(Unknown >Source) > at >org.apache.catalina.core.StandardPipeline.invoke(Unknown >Source) > at >org.apache.catalina.core.ContainerBase.invoke(Unknown >Source) > at >org.apache.catalina.connector.http.HttpProcessor.process(Unknown >Source) > at >org.apache.catalina.connector.http.HttpProcessor.run(Unknown >Source) > at java.lang.Thread.run(Thread.java:484) > > > >-------------------------------------------------------------------------------- > > >__________________________________________________ >Do You Yahoo!? >Everything you'll ever need on one web page >from News and Sport to Email and Music Charts >http://uk.my.yahoo.com > >=========================================================================== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > __________________________________________ "It can only be attributed to human error" 2001 A Space Odyssey =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com