Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-1032

Improve how we handle when multiple persistence units are found and no unitName is specified

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 8.0.0.Alpha2
    • None
    • JPA / Hibernate
    • None

      The current message is

      Caused by: java.lang.IllegalArgumentException: JBAS011470: Persistence unitName was not specified and there are 9 persistence unit definitions in application deployment "test.ear". Either change the application to have only one persistence unit definition or specify the unitName for each reference to a persistence unit.

      Yet what is always helpful in search of such validation errors is the context.

      In that case the offending class name would suffice, you should have this information at hands since you're scanning the classes, right?

      Given that information I'd have found the problem immediately.

              smarlow1@redhat.com Scott Marlow
              msdahm Markus Dahm (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: