I'm running EclipseLink on WLS 10.3.5.
I'm trying to use @NamedNativeQuery annotation, but all the SQL I try causes an "Internal Exception: java.sql.SQLException: SQL string is not Query
" exception.
Even a simple SELECT * FROM TABLE
causes that error where TABLE is the table that the containing Entity is mapped to.
The annotation is:
@NamedNativeQuery(name = AnnouncementDeliveryLog.FIND_NORMALIZED_RECIPIENTS_FOR_ANNOUNCEMENT, query = "SELECT * FROM ANNOUNCEMENT_DELIVERY_LOG", resultClass = AnnouncementDeliveryLog.class)
The query is being executed with:
em.createNativeQuery(AnnouncementDeliveryLog.FIND_NORMALIZED_RECIPIENTS_FOR_ANNOUNCEMENT).getResultList();
I can't find a good way to get more useful information from the system so any information is appreciated.