Task #479
closedShow more details on script execution exception
100%
Description
Currently if groovy script fails its execution or throws an exception, the FE only shows something like:
GROOVY_SCRIPT_EXCEPTION (400:cde52b2a-9848-4e02-b340-62d8b03704bf) Script has some errors: [Script has some errors: [eav attribute kodLdap is empty!]] (message:Script has some errors: [eav attribute kodLdap is empty!])
BE is not any better. Only exception message is shown, stacktrace is useless:
Caused by: eu.bcvsolutions.idm.core.api.exception.ResultCodeException: Script has some errors: [eav attribute *** is empty!] at eu.bcvsolutions.idm.core.model.service.impl.DefaultGroovyScriptService.evaluate(DefaultGroovyScriptService.java:70) at eu.bcvsolutions.idm.core.script.evaluator.AbstractScriptEvaluator.evaluate(AbstractScriptEvaluator.java:94) at eu.bcvsolutions.idm.core.script.evaluator.AbstractScriptEvaluator.evaluate(AbstractScriptEvaluator.java:114) at eu.bcvsolutions.idm.core.script.evaluator.AbstractScriptEvaluator$evaluate$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:150) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.kohsuke.groovy.sandbox.GroovyValueFilter.onMethodCall(GroovyValueFilter.java:58) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:148) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:145)We need more info when script execution fails. Please provide:
- script name if predefined script was used
- line with error (if possible)
- where was script applied, i.e. in what attribute transformation rule etc.
Related issues
Updated by Jan Helbich over 7 years ago
- Subject changed from Show more detail on script execution error to Show more details on script execution exception
Updated by Vít Švanda about 7 years ago
- Target version deleted (
Diamond (7.4.0))
Updated by Vladimír Kotýnek over 5 years ago
I beg for implementation of this feature. It would save us tens of hours of debuging!
Updated by Radek Tomiška over 4 years ago
- Assignee changed from Vít Švanda to Ondrej Husník
Updated by Radek Tomiška over 4 years ago
- Related to Task #1719: Improve error message added
Updated by Radek Tomiška about 4 years ago
- Target version set to 10.6.0
I think, this ticket is solved by #1719, Ondra, can you check the requirement is implemented already, please?
Updated by Ondrej Husník about 4 years ago
This ticket is generalized form of #1719 where the rich error information was implemented for transformation scripts only. Other places with script areas (such as searching for tree roots during tree synchronization etc.) does not have this additional error information implemented. We decided, after consultation with Vitek, that other places does not need this rich error information.
Updated by Ondrej Husník about 4 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Updated by Radek Tomiška about 4 years ago
- Status changed from Resolved to Closed