Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> JDBC ThinDriver Error!!

JDBC ThinDriver Error!!

From: Song Eui-Joon <halley_at_mail.kolon.co.kr>
Date: Mon, 31 Aug 1998 17:32:27 +0900
Message-ID: <35EA5F9A.9FEA590E@mail.kolon.co.kr>


I am running AIX 4.1.5 and Oracle 7.3.2

Any java application to query Oracle dababase on AIX is running well on Win95,

but following error occurs when it runs on AIX to query local Oracle dababase.

I guess this application is connected the database at least.

Could you tell me what is wrong or show me ANOTHER WAY ??

Thanx in advance.

My test application source is :



import java.sql.*;

class JdbcTest1
{
  public static void main (String args [])

       throws SQLException, ClassNotFoundException   {
    Class.forName("oracle.jdbc.driver.OracleDriver");     System.out.println ("STEP 1");
    try

        {
      Connection conn =

DriverManager.getConnection("jdbc:oracle:thin:@MYHOST:1521:ORCL","scott","tiger");
       System.out.println ("STEP 2");
        Statement stmt = conn.createStatement ();
        System.out.println (" STEP 3t");
        ResultSet rset = stmt.executeQuery("SELECT ename FROM emp");
        System.out.println (" STEP 4");
        while (rset.next ())
        System.out.println(rset.getString (1));
        }
        catch( SQLException e ) { System.out.println ("Error : " + e); }

    System.out.println ("STEP 5");
  }
}



Output is :

#STEP 1
#STEP 2
#STEP 3
#java.lang.NullPointerException

        at oracle.jdbc.driver.OracleStatement.doDefaultTypes(Compiled Code)

        at oracle.jdbc.driver.OracleStatement.doExecuteQuery(Compiled Code)

        at oracle.jdbc.driver.OracleStatement.doExecute(Compiled Code)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(Compiled Code)
        at oracle.jdbc.driver.OracleStatement.executeQuery(Compiled
Code)
        at jdbctest.main(Compiled Code)
--------------------------------------------------------------------

When I changed SQL statement on puppose like this

"SELECT ename FROM somethingelse"

I got following error message



#STEP 1
#STEP 2
#STEP 3
#Error : java.sql.SQLException: ORA-00942: table or view does not exist

#5.END


Received on Mon Aug 31 1998 - 03:32:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US