This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes ojdbc thin client - eclipse error in debug mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ojdbc thin client - eclipse error in debug mode" Watch "ojdbc thin client - eclipse error in debug mode" New topic

ojdbc thin client - eclipse error in debug mode

Vamshi Ram

Joined: Nov 07, 2011
Posts: 2

I am going through a strange error with oracle thin client in debug mode. I will very appreciate your involvement to go through the error and reply back a solution or suggestion. Thanks in advance for your involvement.

Database queries to oracle server from java using ojdbc thin client (jdbc:oracle:thin) are fetching data in eclipse "Run As" mode. But the same code when executed in "Debug As" mode is
crashing. The error message is:
Source not found:
The Jar file c:\mvnrepo\com\oracle\ojdbc14\\ojdbc14- has no source attachement.
You can attach the source by clicking Attach Source below:
Please see the attached screen shot for more details ------

the code snipped used for connecting to server and executing the query is below:
String url = "jdbc:oracle:thin:@"+ host + ":" + port + ":" + SID ;
ResultSet resultSet=null;
Connection con=null;
try {
con = DriverManager.getConnection(url, user , pass );
PreparedStatement pStatement = con.prepareStatement(query);
resultSet = pStatement.executeQuery();
the error is thrown while executing executeQuery method. Does anyone know why the program is crashing in debug mode while it's working well in run mode.

Vamshi s

[Thumbnail for ojdbc_debug_err-ss1.png]

[Thumbnail for ojdbc_debug_err-ss2.png]

Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Thats because your ojdbc14- does not has the source code, only the .class files. To debug you will need the source code. ^^

[] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Vamshi Ram

Joined: Nov 07, 2011
Posts: 2

Hebert Coelho, said "To debug you will need the source code.".

that is the error message. I have found the source jar for ojdbc14- and attached it as guided by the error message. But this did not work for me. I did not understand where eclipse is saving the the uploaded source jar and will eclipse remember this for further work ???

I did not find a bin+source distribution of ojdbc14- in a single jar, if a combined jar is available then replacing this with the binary jar could resolve the error?? any input on this.

I agree. Here's the link:
subject: ojdbc thin client - eclipse error in debug mode
It's not a secret anymore!