[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • Last Modified:

code is stuck but works when run in debug mode

I working on a piece of code that
1) Reads table from syabse 12, sybase 15 and oracle 11
2) Dumps the resultset in csv file using opencsv
3)compares the open csv files and reports mismatch in another csv

The code runs n a loop for about 92 tables. some of these tables have millions (2-5 million) records. I ran it yesterday before leveing for home but i found it stuck today morning. No exceptions thrown. Now when I running it after inserting a few break points here and there i can get it to work. But when i run 'run as java application' from eclipse it's getting stuck.

How can i debugg this code. The class is attached as file TableComparator.txt.

TableComparator.txt
0
PearlJamFanatic
Asked:
PearlJamFanatic
  • 6
  • 3
  • 3
  • +1
3 Solutions
 
for_yanCommented:
But you are saying that this exact code ran before for many tables, and only got stuuck yestertday?
Or you did change something before you ran it yesterday?
Sorry, please, explain, it is important to unsderstand.
Can you also post exactly waht opncsv jar you used and the link if possible.
I'd like to at least try to compile your code.
0
 
PearlJamFanaticAuthor Commented:
0
 
PearlJamFanaticAuthor Commented:
No I had not tried it for more than one table before.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
for_yanCommented:
So it actually worked only in debugging mode?

I downloaded opencv fine,
but I could not find these things:

import com.fil.im.replicationtester.util.Constants;
import com.fil.im.replicationtester.util.DbUtil;

Well, even if I compile, I'd not be able to try it as I don't have Sybase and your tables.
0
 
for_yanCommented:
What means it is getting stuck?
Add some pruintouts to understand what it is doing
0
 
objectsCommented:
take a thread dump when it is stuck, that should tell you whats causing it
0
 
PearlJamFanaticAuthor Commented:
How can i take thread dump
0
 
for_yanCommented:

That;s how they explain:

I have run a little Java application (with GUI) in Eclipse, I can see the related javaw.exe in Windows' process manager and its PID, 7088 (it is even simpler in Unix, of course).

If I type at a command prompt jstack 7088, I have the wanted stack dump per thread.
Cool.

Would be better if we could do that directly from Eclipse, but that's already useful as is.
0
 
objectsCommented:
and don't run it from eclipse, its just going to confuse the issue
0
 
for_yanCommented:
If you run it from command line you should  type ctrl-break in the DOS window
0
 
CEHJCommented:
Export the project to an executable jar and run that
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 6
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now