In your hql, you're projecting the ID of the person. This ID is a value of type Integer, just how you mapped that. So you MUST to get it with a variable of Integer type and not an array. Try this on line 23:
If happen something bad in you life, don't ask God why it happened. Ask for what.
SCJP 5 (80%) - SCWCD 5 (91%) - SCBCD & SCJD coming soon...
In your HQL in select clause you have only one column defined to return, so the hibernate returns object only.
if you have defined multiple columns in the select clause then definitely it returns object.