Issue Type: Bug Bug
Affects Versions: 1.0.0.M6
Assignee: Unassigned
Components: security
Created: 14/Dec/12 5:04 AM
Description:

If you try to deploy aerogear-security-picketbox with an application, for example the TODO app, the following deployment error will be displayed:

10:55:19,795 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011401: Read persistence.xml for todo-default
10:55:19,796 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011401: Read persistence.xml for picketbox-default
10:55:19,802 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."todo-ear.ear"."todo-server.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.subunit."todo-ear.ear"."todo-server.war".DEPENDENCIES: Failed to process phase DEPENDENCIES of subdeployment "todo-server.war" of deployment "todo-ear.ear"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_35]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_35]
        at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_35]
Caused by: java.lang.IllegalArgumentException: JBAS011470: Persistence unitName was not specified and there are 2 persistence unit definitions in application deployment "todo-ear.ear".  Either change the application to have only one persistence unit definition or specify the unitName for each reference to a persistence unit.
        at org.jboss.as.jpa.container.PersistenceUnitSearch.resolvePersistenceUnitSupplier(PersistenceUnitSearch.java:69)
        at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.getPersistenceUnit(JPAAnnotationParseProcessor.java:284)
        at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.getBindingSource(JPAAnnotationParseProcessor.java:220)
        at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.processField(JPAAnnotationParseProcessor.java:151)
        at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.processPersistenceAnnotations(JPAAnnotationParseProcessor.java:118)
        at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.deploy(JPAAnnotationParseProcessor.java:90)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
        ... 5 more

PicketBoxLoadUsers could explicitly name the persistence unit that it uses:

@PersistenceContext(unitName = "picketbox-default" , type = PersistenceContextType.EXTENDED)
Fix Versions: 1.0.0.M7
Project: AeroGear
Priority: Major Major
Reporter: Daniel Bevenius
Security Level: Public (Everyone can see)
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira