JPQL does not support the SELECT *
syntax or raw table names. It operates on entity classes and their fields, not on raw database tables.
Here is how u can fix it:-
private static final String FIND_USER_BY_NAME = "SELECT u FROM User u WHERE u.userName = :userName";