Hi all,
Using hibernate 3.4/EJB3.0 we experienced a problem with loading an entity class, which exists outside the war file.
Several options were explored to make this possible:
The jar file was added (where the entity class is located) to the classpath;
Tried to add the jar file to the persistence.xml (between the <jar-file> tags);
A combination of the options above.
All the options stated above resulted in the following error:
Code:
javax.persistence.PersistenceException: org.hibernate.MappingException: Unknown
entity: com.compname.custom.thirdparty.entities.EntityClassEvent
The entity class (EntityClassEvent) can be found but the entities are not processed.
A solution which worked, was to add the entity class inside the war file, but this is not as we would like to see this, because for every change in the entity class, we would have to update the war file.
Is it possible to load and use an entity class which is not contained in the war itself?