Consider the following hierarchy, where entities WidgetA and WidgetB extend an abstract Widget superclass:
@Entity
@In
Hibernate supports that query just fine, and will happily return an instance of the correct subclass. Without knowing what it is in the Spring Data implementation that is trying to make an instance of Widget, you should be able to just declare the query and have it run it directly, rather than using the parser.
public interface WidgetDAO extends JpaRepository {
@Query("select w from Widget w where w.serialNumer = ?1")
public Widget findBySerialNumber(String serialNumber);
}