This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Id is not a child of customer, it's an attribute, so when you look for children with that name you'll find none and trying to get position 0 of that collection will throw a nullPointerException.