I think this is the interesting part:
Caused by: java.lang.NumberFormatException: null
Is there any calculation happening before the object is commited? Any Before commit event, any java action,…?
TextBox should be fine as input widget. But if you have the feeling it might be caused by a wrong input widget, you can try to delete them and recreate them by doing a drag and drop of the attribute from the connector.
Thank you all for your help!
The problem was that on the domain model, there were wrong validations for the Duration and Price fields. I needed to double click on the entity itself and not on the seperate fields to correct it.
before clicking the save button there is no calculation done. The worflow is :
From the Course Overview page click the Add button. So far the list bellow is empty cause no courses are created yet.
After the Add button is clicked, the Course_New_Edit pop-up layout page comes to fill it in with data. On save, I should be able to see the course that I created on the Overview page (and then be able to schedule it from the Calendar button).
Also, I got the notification that someby asked this (although I cannot see it now in the comments)
In the stacktrace you posted you can find this: Caused by: java.lang.NumberFormatException: null. When you save the Course are there any interger attributes being filled with a string value? Cause this error is being trown because an empty string is getting formatted into a interger and that is not possible.
The answer is yes. I do have an integer and a Decimal field.
Duration is integer and Price is Decimal. For both fields are a TextBox. Is this the right way to give Integers and Decimals as an input?
First of all, to answer your question: yes, for integers and decimals you should use a TextBox.
Secondly, the error mentioned by Andreas seems to me that you are trying to send a variable (a number in this case) that is null (empty) or has wrong values. For example an integer can only contain numbers, no text or special characters.
A quick note: If you think you can't continue the learning course because of some errors / bugs and you can't figure out why or what is causing them, don't worry. Every few modules you can download a project package at the resources tab in the online course to continue your project after a certain module.
I can describe you 2 options for trying to solve this:
1. Perhaps you need to look at your domain model to see if the Duration and/or Price attributes of the Course entity has correct settings. To do that: Double-click the attribute Duration within the Course entity. Now check if the value is "Stored" and has a default value of "0", press ok to save changes. After that, check if Price has the same settings, except Duration is integer and Price is decimal.
2. The other option is skipping to solve this minor error at the moment and continue your learning course. So far I know, you can still save new Courses and use the app with or without that bug. You just have to make sure the fields have the correct datatype. Sometimes the online course misses few steps or has old images as I can tell from my own experience and this makes it difficult to follow the course completely. Later on in this course (at module 8) you shall learn to validate the data that you want to send. At this point you can no longer receive errors on wrong input data because you have made microflows that validate this data first before saving the new Course in your case.
I hope my info will help you, otherwise let me know!