cannot save form data error - new in 3?

I am getting a ‘cannot save form data’ error in version 3+ in a situation where there has been no error triggered in version 2.2.7. The error code returned is 330. The error triggers when I try to change data in any field on the form. The form is in a tab panel, related to the controller form through a self-join based on the record id.

Using the sample dataException code to examine exception errors, I get the following output…

Exception Object: com.servoy.j2db.ApplicationException: Cannot save form data
MSG: Cannot save form data
is a ServoyException
Errorcode: 330
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

Given the above form setup, can anyone explain why v3 throws this error when v2 does not? and what the cause might be?

Version 3.1 beta2-build 401
Java version 1.5.0_06-64 (Mac OS X)

I have seen something similar today where (on v 2.2.5) while calling a form in dialog was opened a arrayoutofboundsindex was thrown quite regularly but not always with similar foundsets.

David

Might be stating the obvious but have you checked/updated table sequences on the Table(s)?

Graham

Hi Graham

Have checked and updated sequences but still have same problem.

Interestingly the data changes ARE saved despite the error.

Its also not 100% consistent - mostly I get the error but sometimes not. Can’t yet pin down when or why.

Problem solved, though I’m still not sure of the cause - perhaps someone can explain?

The data save error only occurred when the record was loaded into the form using a numerical representation of the record’s pk converted to a (single row) dataset and loaded using controller.showRecords(dataset). When the record is loaded using a query as the showRecords argument, then no data save error occurs.

In other words the data save error is somehow connected to the way in which the record is loaded into the form. I repeat that there has never been an error in this situation using version 2xx, so something in 3 has changed in this regard. Any explanations gratefully received :D

Hi David,

I have seen something very similar and fixed it by rewriting the code which loaded the record. Not sure why it failed in the first place, though.

drookwood:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

Could you please create a support case at: http://crm.servoy.com/servoy-webclient/ … oy_support
and at least upload your log file, seems an issue

I’m seeing the same problem, forms which worked fine in 2.2.x are now generating errors. I’ll find a reproducable example and post it.

Jan - if you’re at the novotel tomorrow I’ll show you an example!

David, anything more on this?

Hi Antonio

Johan has worked his magic - there should be a new beta released v. soon which seems to have solved the issue - in fact, when I demonstrated it to him on Thursday he said “I think we solved that one yesterday”! That’s what I call responsive! :D

Good news, David. I hope that also means that the current production version will also be patched v. soon.

Hope there will be a fix for 3.0.x:

Exception Object: com.servoy.j2db.ApplicationException: Cannot save form data
MSG: Cannot save form data
is a ServoyException
Errorcode: 330
java.lang.IndexOutOfBoundsException: Index: 25, Size: 25
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
java.lang.IndexOutOfBoundsException: Index: 25, Size: 25
null

Could you please sent us the log when this happens? (preferably via the support system)

issue is fixed in Servoy 3.1b3, see http://forum.servoy.com/viewtopic.php?t=7529