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.
I like that we are including the number of persistence unit definitions (nine in this case). Having the application name is also good. Perhaps some more context about where the reference to the persistence unit (without a name), would be helpful. Since I wrote the message, I understand completely what I meant. ;)
Do you have other suggetions to improve the message to be cleared? Perhaps you could post what it should be changed to.
Scott