Thread: Class not found

  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Rep Power

    Class not found

    I am trying to connect to Interbase database running on Tomcat. I have one error

    An error occured between lines: 12 and 52 in the jsp file: /database/Connection.jsp

    Generated servlet error:
    F:\Tomcat\work\localhost\_\database\Connection$ Class org.apache.jsp.DataSource not found.
    DataSource dataSource = new interbase.interclient.DataSource();
    1 error

    I have done it exactly as it says in the books yet it will not run. Can anyone help me please. Here is my code:
    <%@ page import="java.sql.*"%>
    <%@ page import="interbase.interclient.DataSource.*"%>
    <link rel="STYLESHEET" type="text/css" href="include/style.css">
    <body bgcolor="#cccccc">
    DataSource dataSource = new interbase.interclient.DataSource();

    try {

    // Set the standard properties
    dataSource.setNetworkProtocol("jdbc:interbase:"); /* set the network protocol */
    dataSource.setServerName("//localhost"); /* the hostname or IP address of the server */
    dataSource.setDatabaseName("c:/Jsptest.gdb"); /* the full path to your database file */
    dataSource.setDataSourceName("SomeName"); /* a descriptive name */
    dataSource.setDescription("SomeDescription"); /* a descriptive comment */

    // Set the non-standard properties
    dataSource.setSweepOnConnect(false); /* Perform a sweep when connecting */

    // The following line actually starts up the database connection:
    Connection con = dataSource.getConnection(SYSDBA,masterkey);
  2. #2
  3. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Lincoln, NE. USA
    Rep Power
    It cannot find the Interbase class files. You either need to make sure the (jar?) file(s) are/is in the correct place or that the classpath being used by the servlet engine correctly points to their location.

IMN logo majestic logo threadwatch logo seochat tools logo