• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP-Tomcat-Cloudscape

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am a beginner in JSP. I am Using Tomcat 3.2 as server and Cloudescape364 as db on Win98 OS. I am unable to connect to the database through JSP. If I execute Cloudescape alone from the DOS prompt the database starts up fine. But when I try to execute my JSP (to connect to the database) it fails to connect and throws the following error:
Internal Servlet Error:
javax.servlet.ServletException: Unable to load class COM.cloudscape.core.JDBCDriver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002fupdatephonebook_0002ejspupdatephonebook_jsp_10._jspService(_0002fupdatephonebook_0002ejspupdatephonebook_jsp_10.java:123)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at ...........
Root cause:
java.lang.ClassNotFoundException: Unable to load class COM.cloudscape.core.JDBCDriver
at org.apache.jasper.servlet.JasperLoader.findClass(JasperLoader.java:223)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:147)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal.......
Here is the portion of the code that I am using:
Class.forName("COM.cloudscape.core.JDBCDriver");
Connection con = DriverManager.getConnection("jdbc:cloudscape:C:/MyJSP/phonebook");
Statement st = con.createStatement();
Please let me know if you need more information to under the problem.
NOTE: Also I tried to connect to SQLAnywhere 5.5 using the following code:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc dbc:contact","dba","sql");
Statement st = ct.createStatement();
When I exeute the JSP (with the above code) it throws me a GPF and the server crashes.
Please help me.
Raj.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error message tells you what the problem is:
Root cause:
java.lang.ClassNotFoundException: Unable to load class COM.cloudscape.core.JDBCDriver
Where is the jar file containing this driver? Remember that Tomcat sets its own classpath. It displays this classpath in the window that is created when you run startup.bat. Look at this classpath and see if the jar file is there. It can also be in the /WEB-INF/lib directory rather than Tomcat's global classpath.
------------------
Phil Hanna
Sun Certified Programmer for the Java 2 Platform
Author of :
JSP: The Complete Reference
Instant Java Servlets
 
Raj_kurup
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Phil,
Thanks a lot. I edited the tomacat.bat file to include the jar files for the CLASSPATH variable at the last and it works great.
Raj.
 
reply
    Bookmark Topic Watch Topic
  • New Topic