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_at_rationalconcepts.com>


Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit

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:_at_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:_at_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:_at_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.

--------------2B691ADB655D77DF7667A877
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html>
Here's something else to try:
<p>&nbsp;&nbsp;&nbsp; java -nojit -classpath .;G:\ORANT\JDBC\LIB\classes111.zip JdbcTest
<p>You said that the line failed at
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>Connection conn =</i>

<br><i>> DriverManager.getConnection"jdbc:oracle:thin:_at_larry:1521:ORCL",</i>
<br><i>> "scott", "tiger");</i><i></i>
<p>which should have read Connection conn = DriverManager.getConnection<b>(</b>"...");
(left paran)
<p>but your java command would not have given you that answer.&nbsp; As noted in your stack trace,
<br>&nbsp;&nbsp;&nbsp; <i>...at JdbcTest.main(Compiled Code)</i> ,&nbsp; this indicates the jit compiler was being used which <br>likes to give Compiled Code instead of the line number. <p>Using the -nojit option will tell java not to use the jit and it will yeild the actual
<br>line number of where it's failing.
<p>And another note, are you using the java downloaded from javasoft website (in the jdk/jre) or is it
<br>from somewhere else?
<p>Hope some of this helps,
<br>cindy
<p>Jim George wrote:
<blockquote TYPE=CITE>If you've loaded the driver class&nbsp; oracle.jdbc.driver.OracleDriver,
<br>then you might try
<p>&nbsp; DriverManager.getConnection("jdbc:oracle:thin:_at_larry:1521:orcl",
"scott",
<br>"tiger");
<p>Assuming that larry is your machine pathname, you must be able
<br>to ping "larry" on your network....
<p>lkaplan_at_etrade.com wrote:
<br>>
<br>> Just starting out with Oracle 8 on NT with JDBC. Using sample program
<br>> JdbcTest, the line:
<br>>
<br>> Connection conn =
<br>> DriverManager.getConnection"jdbc:oracle:thin:_at_larry:1521:ORCL",
<br>> "scott", "tiger");
<br>>
<br>> Produces this error when run:
<br>>
<br>> G:\ORANT\JDBC\SAMPLES\THIN>java JdbcTest
<br>> Symantec Java! JustInTime Compiler Version 3.10.093(i) for JDK 1.1.x
<br>> Copyright (C) 1996-98 Symantec Corporation
<br>>
<br>> Loading Oracle driver
<br>> Connecting to the local database
<br>> SQL problem
<br>> java.sql.SQLException: No more data to read from socket
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:446)
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at oracle.jdbc.ttc7.TTCInBuffer.getByte(Compiled
Code)
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at oracle.jdbc.ttc7.TTIMsg.unmarshalSB1(TTIMsg.java:1085) <br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at oracle.jdbc.ttc7.O3log.receive1st(Compiled Code)
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:191)
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at oracle.jdbc.driver.OracleConnection.&lt;init>
<br>> (OracleConnection.java:127)
<br>>
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at oracle.jdbc.driver.OracleDriver.getConnectionInstance
<br>> (OracleDriver.ja
<br>> va:170)
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at oracle.jdbc.driver.OracleDriver.connect
<br>> (OracleDriver.java:148)
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.sql.DriverManager.getConnection(DriverManager.java:83)
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.sql.DriverManager.getConnection(DriverManager.java:126)
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at JdbcTest.main(Compiled
Code)
<br>>
<br>> Thanks for any help
<br>>
<br>> Sent via Deja.com <a href="http://www.deja.com/">http://www.deja.com/</a>
<br>> Share what you know. Learn what you don't.</blockquote>
</html>

--------------2B691ADB655D77DF7667A877-- Received on Thu Aug 26 1999 - 19:43:38 CEST

Original text of this message