Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
jdbc connection for oracle 10g with JDK 1.6
dbk kumar
Greenhorn
Joined: Feb 01, 2010
Posts: 14
posted
Feb 01, 2010 03:39:35
0
I am getting the
SQLRecoverableException
: no more data to read from socket.
What might be the problem?
public static void main(String args[]) { try { String driverName = "oracle.jdbc.driver.OracleDriver"; Class.forName(driverName); Connection conn; conn= DriverManager.getConnection ( "jdbc:oracle:thin:system/khodu@127.0.0.1:1521:PLSExtProc"); Statement stmt=conn.createStatement(); ResultSet rset =stmt.executeQuery("select * from application"); while(rset.next()) { System.out.print(rset.getString(1)); } } catch(Exception e) {System.out.println(e);} } }
dbk kumar
Greenhorn
Joined: Feb 01, 2010
Posts: 14
posted
Feb 01, 2010 03:45:16
0
Please reply fast...
Thanks in advance.!
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
1
I like...
posted
Feb 01, 2010 03:52:33
0
dbk kumar wrote:
Please reply fast...
This is likely to attract slow replies
Use e.printstacktrace() and post the result here. This exception is indicative of a recoverable failure condition.
SCJP 6 articles
-
SCJP 5/6 mock exams
-
SCJP Mocks
-
SCJP 5 Mock exam (Word document )
-
SCJP 5 Mock exam in Java.Inquisition format
santosh kimothi
Ranch Hand
Joined: Jun 10, 2009
Posts: 32
posted
Feb 01, 2010 04:01:45
0
better to display the error message also.
otherwise its difficult to trace
Santosh Kimothi,
Java programmer
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32673
4
posted
Feb 01, 2010 05:18:25
0
And use the
code button
, please not red text, which is harder to read.
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: jdbc connection for oracle 10g with JDK 1.6
Similar Threads
preparedStatement with like where clause
login with Struts2&MySQL
connecting to Webtrends reporting DB using JDBC-ODBC
Everytime getting an empty ResultSet
J2EE + MS SQL SERVER
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter