This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Servlets and the fly likes JSP-Tomcat-Cloudscape Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP-Tomcat-Cloudscape" Watch "JSP-Tomcat-Cloudscape" New topic



Joined: May 12, 2001
Posts: 4
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(
at _0002fupdatephonebook_0002ejspupdatephonebook_jsp_10._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at ...........
Root cause:
java.lang.ClassNotFoundException: Unable to load class COM.cloudscape.core.JDBCDriver
at org.apache.jasper.servlet.JasperLoader.findClass(
at org.apache.jasper.servlet.JasperLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal.......
Here is the portion of the code that I am using:
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:
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.
Phil Hanna
Ranch Hand

Joined: Apr 05, 2001
Posts: 118
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

Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="" TARGET=_blank rel="nofollow">Instant Java Servlets</A>

Joined: May 12, 2001
Posts: 4
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.
Have you checked out Aspose?
subject: JSP-Tomcat-Cloudscape
jQuery in Action, 3rd edition