Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

weird RecordStore error - help...anybody?

 
J Monk
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all. I am receiving an error from a command of the following form:
setRecord(1, data, 0, data.length)
where data is a byte array (defined by a toByteArray() from a ByteArrayOutputStream).
The error states:
javax:microedition.rms.RecordStoreException: Error setting record data: java.io.IOException: write exceeds maximum file size.
The thing I find weird is that, when I display the getSize() and getSizeAvailable() on the RecordStore, I get really big numbers, like:
size is 62200
size available is 546972
while my data is small,
data.length = 9536
So I am confused by the "exceeds maximum file size" notice. The data is definitely small enough to fit in what memory I have available. And...Is there a file involved or is something not quite right with the message, which also appears to have the form of two error messages merged as one.
Does anyone have any ideas as to what I am encountering here? Would anyone know of anyway I can track down such a problem? I'm a bit lost as to how to debug this since it seems like there isn't much I can play around with given the somewhat limited amount of things I can do (and mess up) with RecordStores. Could it be a memory leak/overwrite? (I'm not sure that that is too likely, particularly in Java, but I'm at a bit of a loss as to where to find problems to try to get my hands on.)
Thanks for any help, advice or thoughts!
 
Pavlin Mihalev
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
working with RMS is REALLY confusing ... Please specify the device you are working on.
You could try setting the "MIDlet-Data-Size:" property of the jad - I would expect some limitation under 64k for example. Another thought : try to change the length of the data written in order to find out is there some value wich is accepted.
hope this helps
Good luck !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic