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

Script Registry logs ERROR and Exception for validators

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.3.4
    • Fix Version/s: 5.3.0
    • Component/s: None
    • Labels:
    • Environment:

      JIRA 6.3.15

    • Critical Points:
      0

      Description

      Hello Jamie

      When running Script Registry, it logs an ERROR and Exception for every validator. My guess is that it tries to compile it, but cannot resolve InvalidInputException class. It does not depend if it is inline script or a file.

      2015-10-25 06:43:06,480 ajp-bio-8009-exec-219 WARN GNAT002 403x21185x1 nwuzdh 162.49.176.31 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.common.StaticCompilationChecker [scriptrunner.canned.common.StaticCompilationChecker] No script compile context found... this is a development error: ['context':null, 'script':'import com.opensymphony.workflow.InvalidInputException\ninvalidInputException = new InvalidInputException("Business Approval Subtasks cannot be created manually.")']
      2015-10-25 06:43:06,487 ajp-bio-8009-exec-219 ERROR GNAT002 403x21185x1 nwuzdh 162.49.176.31 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.common.StaticCompilationChecker [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Cannot cast object '{compilationResult=ScriptCompilationResult{errors=[], warnings=[com.onresolve.scriptrunner.canned.common.SourceLocatorSyntaxException: No context set for compile @ line 1, column 1.]}}' with class 'java.util.LinkedHashMap' to class 'com.onresolve.scriptrunner.runner.stc.ScriptCompileContext' due to: org.codehaus.groovy.runtime.metaclass.MissingPropertyExceptionNoStack: No such property: compilationResult for class: com.onresolve.scriptrunner.runner.stc.ScriptCompileContext
      org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{compilationResult=ScriptCompilationResult{errors=[], warnings=[com.onresolve.scriptrunner.canned.common.SourceLocatorSyntaxException: No context set for compile @ line 1, column 1.]}}' with class 'java.util.LinkedHashMap' to class 'com.onresolve.scriptrunner.runner.stc.ScriptCompileContext' due to: org.codehaus.groovy.runtime.metaclass.MissingPropertyExceptionNoStack: No such property: compilationResult for class: com.onresolve.scriptrunner.runner.stc.ScriptCompileContext
              at com.onresolve.scriptrunner.canned.common.StaticCompilationChecker.getContextFromParams(StaticCompilationChecker.groovy:95)
              at com.onresolve.scriptrunner.canned.common.StaticCompilationChecker$getContextFromParams.callCurrent(Unknown Source)
              at com.onresolve.scriptrunner.canned.common.StaticCompilationChecker.doScript(StaticCompilationChecker.groovy:104)
      

      Cheers
      Oles

        Attachments

          Activity

            People

            Assignee:
            jechlin Jamie Echlin
            Reporter:
            Oleksii Oleksii Gnatkevych
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: