Am relatively new to Hibernate. However, i am stuck, please help.
The application is to get information about different machines and store the info in the database.
One main class MachineDetails. Primary key is the IP address. Another child class "HardDiscDetails". There is a foreign key constraint from the main class to the child class.
Pojo for MachineDetails
Pojo for HardDiscDetails
When i run the client i get this exception:
01:47:52,890 ERROR [BasicPropertyAccessor] IllegalArgumentException in class: MachineDetails, getter method of property: NIC_IP
01:47:52,890 INFO [STDOUT] org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of MachineDetails.NIC_IP
I checked and i am getting this error at the step where i save the HardDiscDetails object.
Above i am saving the MachineDetails object (macdel) before i save the child object for HardDiscDetails (hadel). Also as you can see i am able to print out the values of the foreign key column using both the objects. And i when i querry the machine details table on the db(MYSQL) i see the data is saved. But i dont understaqnd why i am not able to persist the child object to the database.
Any help would be greatly appriciated.