Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-4159

5.6.15 throwing java.lang.ClassCastException error when using LdapTemplate

    Details

    • Type: Bug
    • Status: To Do (View Workflow)
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 5.6.15, 6.1.0
    • Fix Version/s: 6.1.0
    • Component/s: None
    • Labels:
      None
    • Critical Points:
      1

      Description

      Steps to reproduce the problem

      1. Add a custom post-function in the workflow transition and using the code below:
        import org.springframework.ldap.core.LdapTemplate
        
        LdapTemplate test = new LdapTemplate()
        log.warn test
        
      2. Save it and publish the workflow.
      3. Performed a transition to trigger the post-function and logs showing the following errors:
        2020-05-29 05:27:37,622 http-nio-8080-exec-15 ERROR admin 327x1011x1 172l8jw 172.17.0.1 /secure/WorkflowUIDispatcher.jspa [c.o.s.jira.workflow.AbstractScriptWorkflowFunction] Script function failed on issue: AA-14, actionId: 11, file: null
        java.lang.ClassCastException: org.springframework.core.convert.support.DefaultConversionService cannot be cast to org.springframework.core.convert.support.GenericConversionService
        	at org.springframework.ldap.odm.typeconversion.impl.ConversionServiceConverterManager.<init>(ConversionServiceConverterManager.java:45)
        	at org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.createDefaultConverterManager(DefaultObjectDirectoryMapper.java:82)
        	at org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.<init>(DefaultObjectDirectoryMapper.java:73)
        	at org.springframework.ldap.core.LdapTemplate.<init>(LdapTemplate.java:93)
        	at Script4.run(Script4.groovy:3)
        

      In the execution history log, it doesn't record any error or success icon.

      Note

      The script is working in the Script Console.

        Attachments

        1. image (4).png
          25 kB
          John Chin Loong

          Structure

            Activity

              People

              Assignee:
              jechlin Jamie Echlin
              Reporter:
              jloong John Chin Loong
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Structure Helper Panel