Mulptiple PersistenceUnit within the Persistence.xml
Caused by: java.lang.IllegalArgumentException: JBAS011470: Persistence unitName was not specified and there are 2 persistence unit definitions in application deployment deployment "xyz-1.0.ear". Either change the application deployment to have only one persistence unit definition or specify the unitName for each reference to a persistence unit.
The Structure of the persistence.xml looks like the following
persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
java:jboss/datasources/FedDS1 XYZServices-1.0.jar xyz.data.entities.Event
java:jboss/datasources/FedDS2
XYZServices-1.0.jar
xyz.data.entities.Event
The persistence.xml resides in the ear.
Responses