java.lang.RuntimeException: javax.annotation.processing.FilerException: Attempt to recreate a file for type {myclass}
The {myclass} here is always an entity class.
I think, a secondary symptom of this is if all your entity classes are all in a single package. This should be the case if you're doing a standard Tapestry5 web application.
The fix to this is to edit the Persistence Unit and add a
<persistence-unit name="PayrollPU" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>cu.ictso.miscapps.entities.Departments</class> <class>cu.ictso.miscapps.entities.Employee</class> <class>cu.ictso.miscapps.entities.Groups</class> <class>cu.ictso.miscapps.entities.ViewAttendance</class> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties> <property name="javax.persistence.jdbc.url" value="jdbc:sqlserver://localhost;databaseName=DTR-Payroll2;Integrated Security=false"/> <property name="javax.persistence.jdbc.user" value="PayMaster"/> <property name="javax.persistence.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> <property name="javax.persistence.jdbc.password" value="123456"/> <property name="javax.persistence.schema-generation.database.action" value="create"/> </properties> </persistence-unit>
Here's an example Persistence Unit.
No comments:
Post a Comment