On 31 Jan 2012, at 1:46 PM, Steve Ebersole wrote: > IIUC that not how use of jboss-logging for generating exception messages is > supposed to work, though to be honest, I do not know the details. Since you > "use this in Validator and Search" I would figure you would know how to do it.
Turns out it is another classical chicken and egg problem. I tried to return a MappingException which is at the time the annotation processor runs not compiled yet (In Search and Validator we use exceptions which are available on the classpath). A solution would be to first compile exceptions prior to running the annotation processor, but that would make the build even more complicated. The alternative is to just return a string @Message(value = "Unable to find mapping information for %s. Are you sure all annotated classes and configuration files are added?", id = 443) String missingEntitySource(String entityName); and use this string in the exception constructor. --Hardy _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev