1 Reply Latest reply on May 2, 2002 7:00 PM by 260316

    Calling Oracle JDBC Driver from JSP

    260316
      I have Apache Tomcat installed under Win2000 and can run simple JSP
      pages without any problems. I have installed Personal Oracle 9.0.1.0.1 on my win2000 PC and I can login using sqlplus as scott/tiger. The database is up.
      But when I try to access an Personal Oracle DB from a JSP page I get the following
      exception:
      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
      root cause

      java.sql.SQLException: Io exception: Bad packet type
           at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
           at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
      ........
      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      Here is my JSP program:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

      <%@page language="java" import="java.sql.*"%>
      <%
      Class.forName("oracle.jdbc.driver.OracleDriver");
      Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@<my host PC name>:8080:shark","scott","tiger");
      Statement stmt = conn.createStatement ();
      stmt.close();
      // Close the connection
      conn.close();
      %>

      Does anyone know why this error is showing up?
      Thanks