I've imported some data from CSV file to MYSQL database. The data is imported properly. But then I run my application corresponding to that database, it gives java.lang.IllegalArgumentException
on each Domain related method.
For example
Contacts contact = Contacts.get(id);
Contacts.count(), etc
Here I checked if it is getting id
properly as well as checked the database with the same id
. Database has the record with same id
. But in grails application it gives IllegalArgumentException
. How to solve this issue?
the
IllegalArgumentException
I was getting was not enough to understand the problem. So I turned on Hibernate Logging and then understood the problem. I had some primitive type of fields in the domain, in which theNULL
value was stored while loading CSV file. Due to which I got the above exception.