`NullPointerException` encountered while retrieving data

So, I am saving a list using spring mvc and jpa like this:

myRepository.save(myObjList);

      

The work is done side by side and retrieves data from the table. Now for the first few records (4-5) I get NullPointerException

while data is also present, but it works fine for the rest of the record.

The data where I am getting NPE refers to the object where the annotation @OneToMany

or is present @ManyToMany

.

Surprisingly, the same code works fine for the same data after 4-5 records.

Am I missing any configuration?

+3


source to share





All Articles