aspose file tools*
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP-Tomcat-Cloudscape" Watch "JSP-Tomcat-Cloudscape" New topic
Author

JSP-Tomcat-Cloudscape

Raj_kurup
Greenhorn

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(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.
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="http://www.amazon.com/exec/obidos/ASIN/0072127686/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072124253/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">Instant Java Servlets</A>
Raj_kurup
Greenhorn

Joined: May 12, 2001
Posts: 4
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP-Tomcat-Cloudscape
 
Similar Threads
unable to load files
Connecting to Navision
Not able to run JSP. (java.sql.SQLException: Unable to connect to any hosts )
Not able to run JSP
Database connection