java.lang.UnsupportedOperationException

Atlassian JIRA | Riad Shalaby | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I already raised a support issue but they said that this is more of a developer question. So i try to explain it here since i really think this is a bug: We are trying to update to Crowd Version 2.6.0 from Crowd Version 2.5.0. We are running our own implementation of a LDAP directory based on the OpenDS.java class. So far our implementation ran fine. Except we are getting a exception when viewing Direct Members of a Group: {code} 2013-02-25 11:34:31,948 http-8095-5 ERROR [console.action.group.ViewGroupMembers] java.lang.UnsupportedOperationException at com.google.common.collect.UnmodifiableListIterator.set(UnmodifiableListIterator.java:51) at java.util.Collections.sort(Collections.java:161) at com.atlassian.crowd.console.action.group.ViewGroupMembers.execute(ViewGroupMembers.java:60) {code} None of the code we added was involved, so i tried to nail the problem down. I got myself the source of the 2.6.0 Crowd. After some searching i found the following lines inside the ViewGroupMembers class: {code} List<User> principalsList = directoryManager.searchDirectGroupRelationships(directoryID, QueryBuilder.queryFor(User.class, EntityDescriptor.user()).childrenOf(EntityDescriptor.group(GroupType.GROUP)).withName(groupName).returningAtMost(EntityQuery.ALL_RESULTS)); Collections.sort(principalsList, EntityComparator.of(User.class)); principals = principalsList; // sort the list {code} The sorting is where the exception happens. The used line in your basic SpringLDAPConnector.java implementation shows that the used method returns a ImmutableList: {code} Line 1415: return ImmutableList.copyOf(results); {code} This is different from the Version 2.5.0 of the SpringLDAPConnector.java, there on line 1396 only the result without converting it to a ImmutableList is returned. I dont know if this is a problem with other people too or am i missing something here ?

    Atlassian JIRA | 4 years ago | Riad Shalaby
    java.lang.UnsupportedOperationException
  2. 0

    I already raised a support issue but they said that this is more of a developer question. So i try to explain it here since i really think this is a bug: We are trying to update to Crowd Version 2.6.0 from Crowd Version 2.5.0. We are running our own implementation of a LDAP directory based on the OpenDS.java class. So far our implementation ran fine. Except we are getting a exception when viewing Direct Members of a Group: {code} 2013-02-25 11:34:31,948 http-8095-5 ERROR [console.action.group.ViewGroupMembers] java.lang.UnsupportedOperationException at com.google.common.collect.UnmodifiableListIterator.set(UnmodifiableListIterator.java:51) at java.util.Collections.sort(Collections.java:161) at com.atlassian.crowd.console.action.group.ViewGroupMembers.execute(ViewGroupMembers.java:60) {code} None of the code we added was involved, so i tried to nail the problem down. I got myself the source of the 2.6.0 Crowd. After some searching i found the following lines inside the ViewGroupMembers class: {code} List<User> principalsList = directoryManager.searchDirectGroupRelationships(directoryID, QueryBuilder.queryFor(User.class, EntityDescriptor.user()).childrenOf(EntityDescriptor.group(GroupType.GROUP)).withName(groupName).returningAtMost(EntityQuery.ALL_RESULTS)); Collections.sort(principalsList, EntityComparator.of(User.class)); principals = principalsList; // sort the list {code} The sorting is where the exception happens. The used line in your basic SpringLDAPConnector.java implementation shows that the used method returns a ImmutableList: {code} Line 1415: return ImmutableList.copyOf(results); {code} This is different from the Version 2.5.0 of the SpringLDAPConnector.java, there on line 1396 only the result without converting it to a ImmutableList is returned. I dont know if this is a problem with other people too or am i missing something here ?

    Atlassian JIRA | 4 years ago | Riad Shalaby
    java.lang.UnsupportedOperationException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      No message provided

      at com.google.common.collect.UnmodifiableListIterator.set()
    2. Guava
      UnmodifiableListIterator.set
      1. com.google.common.collect.UnmodifiableListIterator.set(UnmodifiableListIterator.java:51)
      1 frame
    3. Java RT
      Collections.sort
      1. java.util.Collections.sort(Collections.java:161)
      1 frame
    4. com.atlassian.crowd
      ViewGroupMembers.execute
      1. com.atlassian.crowd.console.action.group.ViewGroupMembers.execute(ViewGroupMembers.java:60)
      1 frame