[jboss-jira] [JBoss JIRA] (AS7-3110) Enhance validation message when multiple persistence units are found

Scott Marlow (JIRA) jira-events at lists.jboss.org
Tue May 22 09:33:18 EDT 2012


    [ https://issues.jboss.org/browse/AS7-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694724#comment-12694724 ] 

Scott Marlow commented on AS7-3110:
-----------------------------------

[This change might help|https://github.com/scottmarlow/jboss-as/commit/f107d2a31a48f7b730878fcbfda30df140219c74], which was made for AS7-4710 (improve checking for ambiguous PU references).  

After https://github.com/jbossas/jboss-as/pull/2312 is merged into AS7, [the as7 nightly build|http://community.jboss.org/thread/167590] could be used to determine if the change helps reduce the pain caused by the "multiple persistence units are found" error.

Hendy, please post in a new AS7 user forum thread or the existing one linked above, rather than discussing here.  More people read the forum threads than the jiras, so its better to discuss what is or isn't a bug there.
                
> Enhance validation message when multiple persistence units are found
> --------------------------------------------------------------------
>
>                 Key: AS7-3110
>                 URL: https://issues.jboss.org/browse/AS7-3110
>             Project: Application Server 7
>          Issue Type: Enhancement
>          Components: JPA / Hibernate
>            Reporter: Markus Dahm
>            Assignee: Scott Marlow
>            Priority: Minor
>             Fix For: 7.2.0.Alpha1
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list