It seems that the problem is the @Transient
annotation on the method. Removing it solved the issue.
Still, in this case, taking into account the @Access and @Id annotation on a field, the @Transient annotation should be ignored. Or, preferably, the error message should be improved.