java.lang.ClassCastException: cwrk2.Book

Oracle Community | 807546 | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Help In Sort ...

    Oracle Community | 1 decade ago | 807546
    java.lang.ClassCastException: cwrk2.Book
  2. 0

    Sort elements of Java ArrayList

    Stack Overflow | 4 years ago | user2996028
    java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Comparable
  3. 0

    java.lang.ClassCastException: jdk.nashorn.internal.objects.NativeArray cannot be cast to java.lang.Comparable

    Stack Overflow | 3 years ago | Paul Verest
    java.lang.ClassCastException: jdk.nashorn.internal.objects.NativeArray cannot be cast to java.lang.Comparable
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.ClassCastException: jdk.nashorn.internal.objects.NativeArray cannot be cast to java.lang.Comparable

    programwith.com | 2 years ago
    java.lang.ClassCastException: jdk.nashorn.internal.objects.NativeArray cannot be cast to java.lang.Comparable
  6. 0

    It appears that, in some cases, {{Collections.emptyMap()}} is being passed as the role qualifier instead of a null. The code below is from the KNS class {{DocumentAuthorizerBase}}. This appears to be causing a problem when attempting to cache the results of permission and role checks as you can see in the stack trace below: {code:title=DocumentAuthorizerBase.java} public final boolean canInitiate(String documentTypeName, Person user) { String nameSpaceCode = KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE; Map<String, String> permissionDetails = new HashMap<String, String>(); permissionDetails.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME, documentTypeName); return getPermissionService().isAuthorizedByTemplate(user.getPrincipalId(), nameSpaceCode, KimConstants.PermissionTemplateNames.INITIATE_DOCUMENT, permissionDetails, Collections.<String, String>emptyMap()); } {code} {noformat} [junit] 2012-05-09 18:00:29,233 [main] u:/d:9212 WARN org.kuali.rice.kim.impl.role.RoleServiceImpl :: Not able to retrieve RoleTypeService from remote system for role Id: 92 [junit] java.lang.ClassCastException: java.util.Collections$EmptyMap cannot be cast to java.lang.Comparable [junit] at java.util.Collections.sort(Collections.java:121) [junit] at org.kuali.rice.core.api.cache.CacheKeyUtils.key(CacheKeyUtils.java:71) [junit] at $Proxy107.principalHasRole(Unknown Source) [junit] at org.kuali.kfs.fp.identity.CashReceiptInitiatorDerivedRoleTypeServiceImpl.hasRoleMembership(CashReceiptInitiatorDerivedRoleTypeServiceImpl.java:82) [junit] at org.kuali.kfs.fp.identity.CashReceiptInitiatorDerivedRoleTypeServiceImpl.principalMemberOfSysUsers(CashReceiptInitiatorDerivedRoleTypeServiceImpl.java:59) [junit] at org.kuali.kfs.fp.identity.CashReceiptInitiatorDerivedRoleTypeServiceImpl.hasDerivedRole(CashReceiptInitiatorDerivedRoleTypeServiceImpl.java:44) [junit] at org.kuali.rice.kim.impl.role.RoleServiceImpl.principalHasRole(RoleServiceImpl.java:1106) [junit] at org.kuali.rice.kim.impl.role.RoleServiceImpl.principalHasRole(RoleServiceImpl.java:498) [junit] at org.kuali.rice.kim.impl.permission.PermissionServiceImpl.isAuthorizedByTemplate(PermissionServiceImpl.java:172) [junit] at org.kuali.rice.kns.document.authorization.DocumentAuthorizerBase.canInitiate(DocumentAuthorizerBase.java:143) [junit] at org.kuali.rice.krad.service.impl.DocumentServiceImpl.getNewDocument(DocumentServiceImpl.java:506) [junit] at org.kuali.rice.krad.service.impl.DocumentServiceImpl.getNewDocument(DocumentServiceImpl.java:469) [junit] at org.kuali.kfs.sys.service.IsDebitTestUtils.getDocument(IsDebitTestUtils.java:110) [junit] at org.kuali.kfs.fp.document.validation.impl.CashReceiptDocumentRuleTest.testIsDebit_liability_zeroAmount(CashReceiptDocumentRuleTest.java:191) {noformat} (stripped reflection trace elements)

    Kuali JIRA | 5 years ago | Jonathan Keller
    java.lang.ClassCastException: java.util.Collections$EmptyMap cannot be cast to java.lang.Comparable

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      cwrk2.Book

      at cwrk2.Catalogue$Com_Util_ComParator.compare()
    2. cwrk2
      Catalogue$Com_Util_ComParator.compare
      1. cwrk2.Catalogue$Com_Util_ComParator.compare(Catalogue.java:73)
      1 frame
    3. Java RT
      Collections.sort
      1. java.util.Arrays.mergeSort(Arrays.java:1181)
      2. java.util.Arrays.sort(Arrays.java:1128)
      3. java.util.Collections.sort(Collections.java:121)
      3 frames