Thread: Class not found

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

    Join Date
    Feb 2002
    Posts
    0
    Rep Power
    0

    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$jsp.java:70: 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.*"%>
    <html>
    <head>
    <title></title>
    <link rel="STYLESHEET" type="text/css" href="include/style.css">
    </head>
    <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 */
    dataSource.setPortNumber(8080);


    // 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
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    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