Could it be a null pointer? First check if the list is not empty and only when not empty commit the list.
Regards,
Ronald
Thanks Ronald for the input. Found the issue. I am forcing some attributes of the object by assigning them null values. Mendix doenst want that I guess since when I added actual values, it work fine.