• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

writeRecord Errors  RSS feed

Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I'm having issues with the writeRecord method in the Data class. It eventually gets called by my modify method, however it throws the following exception:

I know that it might be an issue with the deprecated method I replaced, however when I went back to the orginal code it threw the same exception. Are there any requirements or gotchas with the writeRecord method? Should it still work with the old deprecated method? I'm sure it is something small like the offset being wrong or something.
Thanks in advance!
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Renato,
May I suggest something? Based on your stacktrace, I can see that you have an ArrayIndexOutOfBound exception which is quite common when dealing with IO. Moreover, you have it coupled with RMI. The way I would go about debugging it is take RMI out of equation. This is assuming that you have the same code executing in local mode as well as RMI. Therefore, work in the local mode until you have these bugs taken care of. I usually write small test programs when I am incrementally building my system. Again, a decent IDE is immensely useful here (I use IntelliJ). Run your test program through the debugger and see what is happening.
Let us know how it works out.
author and jackaroo
Posts: 12195
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Renato,
Bharat has a good point - do you know if this worked properly in local mode?
Did you provide the right number of fields in the DataInfo that you are passing to the update method? My immediate suspicion would be that you are missing a field or two.
Perhaps temporarily add a System.out.println statement in the update method showing you what it believes the contents of DataInfo are.
Regards, Andrew
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!