• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

JSP-Tomcat-Cloudscape  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!