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

StackOverflowError in identity query with attribute parameter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • PLINK_2.5.3.Beta1
    • PLINK_2.5.2.FInal
    • IDM
    • None

    Description

      The following query:

      identityManager.createIdentityQuery(User.class).setParameter(new AttributeParameter("hello")).getResultList();
      

      Causes a StackOverflowError to be thrown by the CriteriaBuilder in Hibernate 4.3.0.Beta5. It works fine with Hibernate 4.2.7.Final.

      The issue is caused by the following code in JPAIdentityStore:

      subQuery.groupBy(subQuery.getSelection())
      

      I'm not sure whether or not this is a Hibernate issue, or if it's PicketLink using Hibernate wrongly. The problem can easily be resolved in PicketLink though, by not using subQuery.getSelection() and instead use the following code:

      Path selection = fromProject.get(ownerProperty.getName());
      subQuery.select(selection);
      ...
      subQuery.groupBy(selection).having(
                      cb.equal(cb.count(selection), valuesToSearch.length));
      

      Attachments

        Activity

          People

            psilva@redhat.com Pedro Igor Craveiro
            sthorger@redhat.com Stian Thorgersen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: