Caused by: org.picketlink.idm.IdentityManagementException: PLIDM000001: IdentityType [class org.picketlink.idm.model.sample.Role] already exists with the given identifier [org.picketlink.idm.model.sample.Role@0] for the given Partition [8c75d82f-350b-423b-9274-96464cf7fcc0].
at org.picketlink.idm.internal.ContextualIdentityManager.checkUniqueness(ContextualIdentityManager.java:233)
at org.picketlink.idm.internal.ContextualIdentityManager.add(ContextualIdentityManager.java:84)
at org.jboss.aerogear.unifiedpush.users.PicketLinkDefaultUsers.create(PicketLinkDefaultUsers.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130)
If present (e.g. on second boot of the JBoss AS), the above exception happens.
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
Using an explicit entity listing for the 'unifiedpush' unit (and not including the 'Developer' class here):
... <class>org.jboss.aerogear.unifiedpush.jpa.PersistentObject</class> <class>org.jboss.aerogear.unifiedpush.model.AbstractVariant</class> <class>org.jboss.aerogear.unifiedpush.model.AndroidVariant</class> <class>org.jboss.aerogear.unifiedpush.model.InstallationImpl</class> <class>org.jboss.aerogear.unifiedpush.model.iOSVariant</class> <class>org.jboss.aerogear.unifiedpush.model.PushApplication</class> <class>org.jboss.aerogear.unifiedpush.model.SimplePushVariant</class> <exclude-unlisted-classes>true</exclude-unlisted-classes> ...This JBoss AS generates the following exception:
Caused by: org.picketlink.idm.IdentityManagementException: PLIDM000001: IdentityType [class org.picketlink.idm.model.sample.Role] already exists with the given identifier [org.picketlink.idm.model.sample.Role@0] for the given Partition [8c75d82f-350b-423b-9274-96464cf7fcc0]. at org.picketlink.idm.internal.ContextualIdentityManager.checkUniqueness(ContextualIdentityManager.java:233) at org.picketlink.idm.internal.ContextualIdentityManager.add(ContextualIdentityManager.java:84) at org.jboss.aerogear.unifiedpush.users.PicketLinkDefaultUsers.create(PicketLinkDefaultUsers.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09] at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09] at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130)The problem here is that we add the 'Developer' role, even if that is already present:
https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/users/PicketLinkDefaultUsers.java#L66
If present (e.g. on second boot of the JBoss AS), the above exception happens.