Hello together,
We are not able to get hibernate to run in our eclipse rcp application. It works from the IDE, but not in build environment. We get the following error:
Caused by: java.lang.IllegalArgumentException: Not an entity: org.teraport.persistence.dao.mocca.TeraportDao
at org.hibernate.metamodel.model.domain.internal.JpaMetamodelImpl.entity(JpaMetamodelImpl.java:204)
at org.hibernate.query.sqm.tree.select.AbstractSqmSelectQuery.from(AbstractSqmSelectQuery.java:237)
at org.hibernate.query.sqm.tree.select.AbstractSqmSelectQuery.from(AbstractSqmSelectQuery.java:42)
at org.teraport.persistence.datastorage.hibernate.HibernateStorage$5.doTransaction(Unknown Source)
Hibernate knows this class and the class is annotated. Also annotations are not skiped by javac.The error is annotation related, due to old xml based config works.
We have tried everything Buddy-ClassPath related, but without success. We don't use any persistance.xml or external config files, but configuration code:
protected void addAllClassesInHierachyAsAnnotated( Configuration configuration ) {
Set<Class<?>> knownList = HibernateConnectionBuffer.getAllKNownClasses();
for ( Class<?> currentClass : knownList ) {
configuration.addAnnotatedClass( currentClass );
}
}
All annotated DAO classes lies in one plugin together with the hibernate libs.
Has anybody experience or an hint how to get hibernate annotations to run?