This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ojdbc thin client - eclipse error in debug mode

 
Vamshi Ram
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

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\10.2.0.2.0\ojdbc14-10.2.0.2.0.jar 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 {
Class.forName(tns[0]);
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.



Thanks,
Vamshi s
ojdbc_debug_err-ss1.png
[Thumbnail for ojdbc_debug_err-ss1.png]
ojdbc_debug_err-ss2.png
[Thumbnail for ojdbc_debug_err-ss2.png]
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats because your ojdbc14-10.2.0.2.0.jar does not has the source code, only the .class files. To debug you will need the source code. ^^
 
Vamshi Ram
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

that is the error message. I have found the source jar for ojdbc14-10.2.0.2.0 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-10.2.0.2.0 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.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic