In hibernate I want to run this JPQL / HQL query:
select new org.test.userDTO( u.id, u.name, u.securityRoles)
FROM User u
WHERE u.name = :na
I believe you need to declare a 0-arg constructor in your UserDTO class.
EDIT:
Or a constructor which takes Integer instead of int as the first argument. When looking up constructors using reflection Hibernate might not treat them as 'compatible' types.
Basically, I would focus on the Unable to locate appropriate
constructor on class [...UserDTO] part of the message.