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 -> Re: JDBC error with Oracle

Re: JDBC error with Oracle

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: Thu, 26 Aug 1999 10:43:38 -0700
Message-ID: <37C57CCA.1A3CCFF1@rationalconcepts.com>


Here's something else to try:

    java -nojit -classpath .;G:\ORANT\JDBC\LIB\classes111.zip JdbcTest

You said that the line failed at

           Connection conn =
> DriverManager.getConnection"jdbc:oracle:thin:@larry:1521:ORCL",
> "scott", "tiger");

which should have read Connection conn = DriverManager.getConnection("..."); (left paran)

but your java command would not have given you that answer. As noted in your stack trace,

    ...at JdbcTest.main(Compiled Code) , this indicates the jit compiler was being used which
likes to give Compiled Code instead of the line number.

Using the -nojit option will tell java not to use the jit and it will yeild the actual
line number of where it's failing.

And another note, are you using the java downloaded from javasoft website (in the jdk/jre) or is it
from somewhere else?

Hope some of this helps,
cindy

Jim George wrote:

> If you've loaded the driver class oracle.jdbc.driver.OracleDriver,
> then you might try
>
> DriverManager.getConnection("jdbc:oracle:thin:@larry:1521:orcl", "scott",
> "tiger");
>
> Assuming that larry is your machine pathname, you must be able
> to ping "larry" on your network....
>
> lkaplan_at_etrade.com wrote:
> >
> > Just starting out with Oracle 8 on NT with JDBC. Using sample program
> > JdbcTest, the line:
> >
> > Connection conn =
> > DriverManager.getConnection"jdbc:oracle:thin:@larry:1521:ORCL",
> > "scott", "tiger");
> >
> > Produces this error when run:
> >
> > G:\ORANT\JDBC\SAMPLES\THIN>java JdbcTest
> > Symantec Java! JustInTime Compiler Version 3.10.093(i) for JDK 1.1.x
> > Copyright (C) 1996-98 Symantec Corporation
> >
> > Loading Oracle driver
> > Connecting to the local database
> > SQL problem
> > java.sql.SQLException: No more data to read from socket
> > at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:446)
> > at oracle.jdbc.ttc7.TTCInBuffer.getByte(Compiled Code)
> > at oracle.jdbc.ttc7.TTIMsg.unmarshalSB1(TTIMsg.java:1085)
> > at oracle.jdbc.ttc7.O3log.receive1st(Compiled Code)
> > at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:191)
> > at oracle.jdbc.driver.OracleConnection.<init>
> > (OracleConnection.java:127)
> >
> > at oracle.jdbc.driver.OracleDriver.getConnectionInstance
> > (OracleDriver.ja
> > va:170)
> > at oracle.jdbc.driver.OracleDriver.connect
> > (OracleDriver.java:148)
> > at java.sql.DriverManager.getConnection(DriverManager.java:83)
> > at java.sql.DriverManager.getConnection(DriverManager.java:126)
> > at JdbcTest.main(Compiled Code)
> >
> > Thanks for any help
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
Received on Thu Aug 26 1999 - 12:43:38 CDT

Original text of this message

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