Hi all,
I have been getting this error and my solution ‘breaks’:
Error in relation
java.lang.ArrayIndexOutOfBoundsException: 5
I have a table ‘sales_cycles’ and ‘sales_cycle_items’ that has a relation salescycles_to_cycleitems.
There is a form that is shown (‘frm_edit_sales_cycle’) when a user clicks a ‘sales cycle’ record that opens another form where the user can add and edit the cycle items for each sales cycle.
The solution crashes with the above error when the ‘frm_edit_sales_cycle’ is opened. once the error dialogue is cleared, you can add new records to the ‘frm_edit_sales_cycle’ form but they will not save.
This happened after upgrading to 4.1.3. As I’m fairly new at this, I did not want to ‘blame’ Servoy
but was wondering if someone may be able to assist me.
Hi,
Hard to guess what is wrong here, can you upload a small sample solution ??
Regards,
Hans
Hi Hans,
A sample solution is attached. One of the forms displays info from the data gerenated in the other 2, pretty self explanatory when you open it.
Thank you for your assistance, it is much appreciated.
ValueListError.servoy (10.3 KB)
I’l have a look at it this evening.
Regards,
Hans
full_noize:
Hi all,
I have been getting this error and my solution ‘breaks’:
Error in relation
java.lang.ArrayIndexOutOfBoundsException: 5
I have a table ‘sales_cycles’ and ‘sales_cycle_items’ that has a relation salescycles_to_cycleitems.
There is a form that is shown (‘frm_edit_sales_cycle’) when a user clicks a ‘sales cycle’ record that opens another form where the user can add and edit the cycle items for each sales cycle.
The solution crashes with the above error when the ‘frm_edit_sales_cycle’ is opened. once the error dialogue is cleared, you can add new records to the ‘frm_edit_sales_cycle’ form but they will not save.
This happened after upgrading to 4.1.3. As I’m fairly new at this, I did not want to ‘blame’ Servoy
but was wondering if someone may be able to assist me.
There is no form ‘frm_edit_sales_cycle’ in the export. Also no sample data. All forms that are present are displayed without error ( though not much info in there).
Hi,
Agree, this sample is not complete and can not be used to analyze the problem.
Regards,
Hans
Hi gentlemen,
I am sorry, I did not intend to waste your time. I admit I was not not familiar with the export process, now I have included referenced modules. I have included sample data too, I hope this works. I also ensured that the sample is a little more user friendly and tested it by deleting and importing.
The solution won’t save line items created, and this has got to do with me doing something wrong, I am sure. I wish I knew what it was, because it has taken a lot longer to put the sample solution together than it would take to fix the problem if I knew what it was!
Thank you in advance for any help you are able to give.
If my first 100 posts are asking for help, I hope all my 100++ posts are giving help!
ValueListError.servoy (66 KB)
full_noize:
Hi gentlemen,
I am sorry, I did not intend to waste your time. I admit I was not not familiar with the export process, now I have included referenced modules. I have included sample data too, I hope this works. I also ensured that the sample is a little more user friendly and tested it by deleting and importing.
The solution won’t save line items created, and this has got to do with me doing something wrong, I am sure. I wish I knew what it was, because it has taken a lot longer to put the sample solution together than it would take to fix the problem if I knew what it was!
Thank you in advance for any help you are able to give.
If my first 100 posts are asking for help, I hope all my 100++ posts are giving help!
And how to “break” the solution ? Which are the steps?
- Add a new sales cycle from the first form to load - this should work OK
- Click the button next to the new record, should load up the lst_xxx form
- Click the green add record button, fill in some detail for the new record
Try and save - (the new record created on the lst_xxx form) and it won’t save. This was ‘breaking’ another part of the solution that relied on the salescycles_to_cycleitems relationship.
Thanks for your time Laurian. I need to ‘think’ like a foundset…
So, what I do is: go to form frm_admin_vl_choice_copy , click on add button, then click on edit button left to the new record, there i fill in some details and click save. Is there something more that I am missing ?
I could not get the data to save to the database.
If you click save the data does not save. I had Sybase Central open when I was editing the methods and forms, and could only get data to save to the ‘sales_cycles’ table. When you try and save line item data added from the ‘lst_salescycleitems_’ form, it does not save to the ‘sales_cycle_items’ table - the data does not show in Sybase Central (and I did click ‘Refresh Folder’).
If you then restart smart client, the data is gone because it never got written to the backend - the onSave method does not work, I even tried both databaseManager.saveData();
databaseManager.commitTransaction()
But didn’t work. Are you able to replicate?
I can save without any problems; there should be more information in the log(s) why save fails.
Hi,
I see that Laurian is handling this ( I expect it will be handled perfectly as usual ), so I wil not investigate further.
Regards,
Hans
Hi Laurian,
I will look in the logs first next time!
The PK of the sales_cycle__items table was not auto incrementing. Not sure how I did that.
Thank youvery much for your help. Can’t beleive how much time I did on this. I am better for it though!
Hans,
Thank you also for your help, it was much appreciated.