Uploaded image for project: 'PicketLink'
  1. PicketLink
  2. PLINK-712

Cannot query roles from jpastore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • PLINK_2.7.0.Final
    • IDM
    • None

    Description

      I want to execute a simple query to get all roles. In my testcase running outsite the container the exact same query is working. But when I deploy my application and try to get all roles I get the following error:

      java.lang.RuntimeException: org.picketlink.idm.IdentityManagementException: PLIDM000501: Could not query IdentityType using query [org.picketlink.idm.query.internal.DefaultIdentityQuery@11baaea2].
      

      My configuration looks as follows

      private IdentityConfiguration buildIdentityConfiguration() {
      		IdentityConfigurationBuilder builder = new IdentityConfigurationBuilder();
      		return builder
      		.named("default")
      		.stores()
      		.jpa()
      		.supportType(AppUser.class, AppRole.class, AppDepartment.class)
      		.supportGlobalRelationship(AppGrant.class, Relationship.class)
      		.supportCredentials(true)
      		.supportPermissions(true)
      		.mappedEntity(User.class, Role.class, PasswordStore.class,
      				Department.class, GrantStore.class,
      				RelationshipIdentity.class, RelationshipType.class,PasswordStore.class)
      		.addContextInitializer(new ContextInitializer() {
      			@Override
      			public void initContextForStore(IdentityContext context,
      					IdentityStore<?> store) {
      				if (store instanceof JPAIdentityStore) {
      					if (!context
      							.isParameterSet(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER)) {
      						context.setParameter(
      								JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER,
      								em);
      					}
      				}
      			}
      		}).build();
      	}
      

      This is the query I'm trying to execute:

      IdentityQueryBuilder imq = im.getQueryBuilder();
      IdentityQuery<AppRole> roleQuery = imq.createIdentityQuery(AppRole.class);
      roleQuery.getResultList();
      

      Querying users works fine.

      Attachments

        Activity

          People

            psilva@redhat.com Pedro Igor Craveiro
            xintellion_jira Melvin Williams (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: