BEST PRACTISE: Referencing Entities in persistence.xml (JAVA SE)? [message #1693344] |
Thu, 23 April 2015 12:02 |
Reiner Lott Messages: 4 Registered: August 2013 |
Junior Member |
|
|
Hi...
our company does build new applications with JPA as underlying framework.
The project strucutre looks like this:
JAVA Project (Main APP with gui)
JAVA Project (Entities with business logic)
Due to this situation, it is necessary that the entity beans must be entered in the persistence.xml by hand (<class>XYZ</class>), otherwise an exception is thrown:
"in thread "main" java.lang.IllegalArgumentException: Unknown entity bean class: class XYZ, please verify that this class has been marked with the @Entity annotation."
Is there a possibility that the entities are found automatically?
What has to be done if i use:
1) a pure java project without using maven
2) maven for dependency management
Kind regards
Reiner
[Updated on: Wed, 29 April 2015 14:25] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04796 seconds