• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ojdbc14.jar, batch update problem

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
i am using oracle 9.2.0.6.0, and using ojdbc14.jar for accessing in my java program. i have some process to be run which has batch update.
sometimes when i run these process, i get exception which is pasted below.



The occurance is very very rare. i dont have any idea in which case its coming. i tried to follow this up, but sometimes it doesnt come for days and suddenly this problem may come.

I tried googling and am not able to figure out the solution for this.
please help...
 
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's difficult to tell without looking at the code, it must not to be difficult to debug NullPointerException. You need to closly look at


com.infy.cis.common.dbmgr.SRMTransMgr.makePrepStatement(SRMTransMgr.java:886)


this method. Put a debug statement to print all the values that are bounded to the SQL, mostly one of the parameter will be "null". If so then you need to fix this by calling setNull(int,int) api of the prepared statement to actually set the null value.
 
Sri Ram
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually i found that there was a problem in ojdbc14.jar which gives the same error. so i was thinking if this could be because of that.

And there can be no null values for this update statement since this is working in most cases and not working in only very rare conditions.
and in each case, its only one value thts updated.
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've seen Oracle errors like this before and the best you can do is try to determine why its occurring and avoid it if you can. Often its a concurrency issue.
 
Sri Ram
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually i cant avoid that execute batch since that block needs to be processed for all the applications. thats where the update happens to DB after processing.

Now can i set some where the max batch size in DB so that even though i have a batch update, only one record is picked at a time.
 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By avoid, I meant determine the root cause of the problem. Usually there is some specific data issue that will reproduce it.
 
Sri Ram
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Even i taught so. But when i try to re run the same record without changing anything, the process goes thro and is saved to DB. only in this case, only one record is processed instead of a batch.
 
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic