Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-3801

ActivationStatusType cannot be cast to java.lang.String

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.5 (Einstein)
    • Fix Version/s: 3.5.1, 3.6 (Comenius)
    • Component/s: Repository
    • Labels:
      None

      Description

      create schema extension of ActivationStatusType:
      <xsd:element name="overrideAdministrativeStatus" type="c:ActivationStatusType" minOccurs="0">
      <xsd:annotation>
      <xsd:appinfo>
      <a:indexed>true</a:indexed>
      <a:displayName>Override Administrative status</a:displayName>
      <a:displayOrder>900</a:displayOrder>
      </xsd:appinfo>
      <xsd:documentation>
      If this is filled, override administrative status from HR calculated from status.
      If you use this, please write to description a reason, why you do this (for example: She works on maternity leave).
      </xsd:documentation>
      </xsd:annotation>
      </xsd:element>

      edit one user and set to 'enabled'
      try to find user over GUI setting 'Override Administrative status'= enabled,
      500 is occured

      ERROR (com.evolveum.midpoint.web.component.data.SelectableBeanObjectDataProvider): Couldn't count objects.
      com.evolveum.midpoint.util.exception.SystemException: com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType cannot be cast to java.lang.String
      at com.evolveum.midpoint.repo.sql.helpers.BaseHelper.handleGeneralRuntimeException(BaseHelper.java:178) ~[repo-sql-impl-3.5.1-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.repo.sql.helpers.BaseHelper.handleGeneralException(BaseHelper.java:158) ~[repo-sql-impl-3.5.1-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever.countObjectsAttempt(ObjectRetriever.java:353) ~[repo-sql-impl-3.5.1-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.countObjects(SqlRepositoryServiceImpl.java:454) ~[repo-sql-impl-3.5.1-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.repo.cache.RepositoryCache.countObjects(RepositoryCache.java:227) ~[repo-cache-3.5.1-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.model.impl.controller.ModelController.countObjects(ModelController.java:1218) ~[model-impl-3.5.1-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.web.component.data.SelectableBeanObjectDataProvider.internalSize(SelectableBeanObjectDataProvider.java:209) ~[SelectableBeanObjectDataProvider.class:na]
      at com.evolveum.midpoint.web.component.data.BaseSortableDataProvider.size(BaseSortableDataProvider.java:248) [BaseSortableDataProvider.class:na]

      Caused by: java.lang.ClassCastException: com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType cannot be cast to java.lang.String
      at org.hibernate.type.descriptor.java.StringTypeDescriptor.unwrap(StringTypeDescriptor.java:39) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
      ....
      at org.hibernate.internal.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:966) ~[hibernate-core-4.3.11.Final.jar:4.3.11.Final]
      at com.evolveum.midpoint.repo.sql.query2.RQueryImpl.uniqueResult(RQueryImpl.java:50) ~[repo-sql-impl-3.5.1-SNAPSHOT.jar:na]
      at com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever.countObjectsAttempt(ObjectRetriever.java:346) ~[repo-sql-impl-3.5.1-SNAPSHOT.jar:na]

        Attachments

          Activity

            People

            • Assignee:
              oscar Gustáv Pálos
              Reporter:
              oscar Gustáv Pálos
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: