Class cast exceptions observed while fetching customer requests

XMLWordPrintable

    • Severity 2 - Major
    • 1

      Issue Summary

      Similar to Search via REST API might fail due to ClassCastException, ServiceDesk can cause class cache exceptions while fetching customer requests using GET /rest/servicedeskapi/request.

      com.atlassian.crowd.exception.DirectoryInstantiationException: com.atlassian.cache.CacheException: com.atlassian.cache.CacheException: com.atlassian.crowd.exception.DirectoryInstantiationException: java.lang.ClassCastException: class org.springframework.core.convert.support.DefaultConversionService cannot be cast to class org.springframework.core.convert.support.GenericConversionService (org.springframework.core.convert.support.DefaultConversionService is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @52da1cfd; org.springframework.core.convert.support.GenericConversionService is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @1a717d79)
      	at com.atlassian.crowd.directory.loader.CacheableDirectoryInstanceLoader.getDirectory(CacheableDirectoryInstanceLoader.java:83)
      	at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.getDirectoryImplementation(DirectoryManagerGeneric.java:296)
      	at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.findUserByName(DirectoryManagerGeneric.java:317)
      	at com.atlassian.crowd.manager.application.canonicality.CanonicalEntityByNameFinder.findByName(CanonicalEntityByNameFinder.java:109)
      	at com.atlassian.crowd.manager.application.canonicality.CanonicalEntityByNameFinder.findByName(CanonicalEntityByNameFinder.java:95)
      	at com.atlassian.crowd.manager.application.canonicality.CanonicalEntityByNameFinder.findUserByName(CanonicalEntityByNameFinder.java:79)
      	at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.findUserByName(ApplicationServiceGeneric.java:319)
      	at com.atlassian.crowd.embedded.core.CrowdServiceImpl.getUser(CrowdServiceImpl.java:86)
      	...
      	java.lang.ClassCastException: class org.springframework.core.convert.support.DefaultConversionService cannot be cast to class org.springframework.core.convert.support.GenericConversionService (org.springframework.core.convert.support.DefaultConversionService is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @189c585e; org.springframework.core.convert.support.GenericConversionService is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @1a717d79)
      

      Steps to Reproduce

      No particular steps could be identified, the issue is happening at random.

      Expected Results

      No class cast exceptions should be thrown and requests should be served.

      Actual Results

      The below exception is thrown in the xxxxxxx.log file:

      com.atlassian.crowd.exception.DirectoryInstantiationException: java.lang.ClassCastException: class org.springframework.core.convert.support.DefaultConversionService cannot be cast to class org.springframework.core.convert.support.GenericConversionService (org.springframework.core.convert.support.DefaultConversionService is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @189c585e; org.springframework.core.convert.support.GenericConversionService is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @1a717d79) 

      Workaround

      Rolling restart of the nodes helped in getting rid of these exceptions. But this workaround did not help all the time and multiple restarts are required.

      Versions Tested

      Please confirm all versions that have been tested for this issue, and indicate whether the tested version is affected or not affected, below: 

      Testing Requirements Version Affected Version
      Customers Reported Version 5.4.18 (Yes / No)
      Most Recent Bug-Fix Release    
      Previous Major Release    
      Most Recent LTS    
      Previous Supported LTS    
      Other Versions..    
      (Add rows as needed)    

       

            Assignee:
            Sam Xu
            Reporter:
            Nikhil Patil
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: