|
I have the exact issue as well. I have custom types and entities. The issue I see happening is it is trying to find entities for the basic types provided by PicketLink even though I am not making use of them. Here is my Identity Config :
IdentityConfigurationBuilder builder = new IdentityConfigurationBuilder();
builder .named("default") .stores() .jpa() .mappedEntity( com.mycompany.picketlinkplayground.model.entity.CompanyRealmTypeEntity.class, com.mycompany.picketlinkplayground.model.entity.MainPartitionTypeEntity.class, com.mycompany.picketlinkplayground.model.entity.CustomRoleTypeEntity.class, com.mycompany.picketlinkplayground.model.entity.CustomGroupTypeEntity.class, com.mycompany.picketlinkplayground.model.entity.CustomRelationshipTypeEntity.class, com.mycompany.picketlinkplayground.model.entity.CustomGrantTypeEntity.class, com.mycompany.picketlinkplayground.model.entity.EmployeeTypeEntity.class, com.mycompany.picketlinkplayground.model.entity.CustomGroupMembershipTypeEntity.class, com.mycompany.picketlinkplayground.model.entity.CustomRelationshipIdentityTypeEntity.class) .supportGlobalRelationship( com.mycompany.picketlinkplayground.model.CustomGrant.class, com.mycompany.picketlinkplayground.model.CustomGroupMembership.class) .addContextInitializer(this.contextInitializer) .supportType( com.mycompany.picketlinkplayground.model.CompanyRealm.class, com.mycompany.picketlinkplayground.model.CustomRole.class, com.mycompany.picketlinkplayground.model.CustomGroup.class, com.mycompany.picketlinkplayground.model.Employee.class) // Specify that this identity store configuration supports all features .supportAllFeatures() ;
Here is my persistence.xml
<persistence-unit name="primary"> <jta-data-source>java:jboss/datasources/MySqlDS2</jta-data-source> <class>com.mycompany.picketlinkplayground.model.entity.CompanyRealmTypeEntity</class> <class>com.mycompany.picketlinkplayground.model.entity.MainPartitionTypeEntity</class> <class>com.mycompany.picketlinkplayground.model.entity.CustomGrantTypeEntity</class> <class>com.mycompany.picketlinkplayground.model.entity.CustomGroupMembershipTypeEntity</class> <class>com.mycompany.picketlinkplayground.model.entity.CustomGroupTypeEntity</class> <class>com.mycompany.picketlinkplayground.model.entity.CustomRelationshipIdentityTypeEntity</class> <class>com.mycompany.picketlinkplayground.model.entity.CustomRelationshipTypeEntity</class> <class>com.mycompany.picketlinkplayground.model.entity.CustomRoleTypeEntity</class> <class>com.mycompany.picketlinkplayground.model.entity.EmployeeTypeEntity</class> <properties>
I keep getting errors Like the following: at org.picketlink.idm.internal.DefaultPartitionManager.createIdentityStore(DefaultPartitionManager.java:844) [picketlink-2.7.0.Beta1-20140731.jar:] at org.picketlink.idm.internal.DefaultPartitionManager.<init>(DefaultPartitionManager.java:225) [picketlink-2.7.0.Beta1-20140731.jar:] ... 81 more Caused by: org.picketlink.idm.config.SecurityConfigurationException: Invalid mapping for type [class org.picketlink.idm.model.basic.Group]. No entity found with a field annotated with interface org.picketlink.idm.jpa.annotations.Identifier. at org.picketlink.idm.jpa.internal.JPAIdentityStore.checkIfAnnotationIsDefined(JPAIdentityStore.java:1990) [picketlink-2.7.0.Beta1-20140731.jar:] at org.picketlink.idm.jpa.internal.JPAIdentityStore.validateTypeMapping(JPAIdentityStore.java:1956) [picketlink-2.7.0.Beta1-20140731.jar:] at org.picketlink.idm.jpa.internal.JPAIdentityStore.validateConfiguration(JPAIdentityStore.java:1909) [picketlink-2.7.0.Beta1-20140731.jar:] at org.picketlink.idm.jpa.internal.JPAIdentityStore.setup(JPAIdentityStore.java:149) [picketlink-2.7.0.Beta1-20140731.jar:] at org.picketlink.idm.jpa.internal.JPAIdentityStore.setup(JPAIdentityStore.java:119) [picketlink-2.7.0.Beta1-20140731.jar:] at org.picketlink.idm.internal.DefaultPartitionManager.createIdentityStore(DefaultPartitionManager.java:840) [picketlink-2.7.0.Beta1-20140731.jar:] ... 82 more
As You can see, It is complaining about not finding an entity for the Group type in org.picketlink.idm.model.basic. This is random as it also complains about User, Agent Role, ....
I am seeing the issue with both picketlink-2.7.0.Beta1-20140731 and 2.6.0.
Any help would be appreciated.
Thanks, Tamer
|