• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Purging Process halts after running 10 delete queries - Finally exiting with java.sql.BatchUpdateExc

 
Ranch Hand
Posts: 33
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
have a requirements to create a purging program using Java to purge record from database. Records will be purged from each tables before certain date (depending on defined in property file).

I have created program and decided all tables in to certain functions (NOT database function, but Java functions user defined) so that it can handles interdependent tables together. This program runs fine till 10 queries (first 4 functions) but halts at 5 the function of sequence defined.

In this case it takes very long time > 20 - 30 mins and finally aborted with following exception.



Could anyone please suggest me where do i need to start digging into?

Regards,
Jay Shukla
 
Jay B Shukla
Ranch Hand
Posts: 33
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just miss to add -- This is a standalone Java program. Oracle is 11g.
 
Sheriff
Posts: 11606
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jay B Shukla wrote:Could anyone please suggest me where do i need to start digging into?


From a quick google search it seems it's related to an error to the database server itself. So maybe check the oracle logs first to see if you can find the root cause.
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How much is being purged?
If it's a lot then the connection could simply be timed out.

Have you tested the DELETE statements in the database directly?
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe that connection which is doing some work shouldn't time out, but I might be wrong.

However, I've noticed this is a batch update exception. I've seen network errors to happen when using large batches, specifically with Oracle. It's natural to expect that the bigger the batch, the better - and faster, but unfortunately a batch which is too large (larger than, say, a hundred of records) isn't going to perform any better than moderately sized batches and can actually fail.

How large are your batches, Jay?
reply
    Bookmark Topic Watch Topic
  • New Topic