This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ojdbc thin client - eclipse error in debug mode" Watch "ojdbc thin client - eclipse error in debug mode" New topic
Author

ojdbc thin client - eclipse error in debug mode

Vamshi Ram
Greenhorn

Joined: Nov 07, 2011
Posts: 2
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


[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-10.2.0.2.0.jar does not has the source code, only the .class files. To debug you will need the source code. ^^


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

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


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ojdbc thin client - eclipse error in debug mode
 
Similar Threads
JDBC Prepared Statement - multiple datatypes as input
newbie to both java and oracle.. how do i ...
problem occurs when connecting to thin driver...
about class not found exception in eclipse
access denied (java.util.PropertyPermission oracle.jserver.version read)