We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncovered this issue on master while investigating #17506
It appears the Groovy module may be using a different class loader which is causing class resolution errors during script compilation.
Reproduction:
Try the following in a script_field:
script_field
"script": "import org.elasticsearch.common.Strings; org.elasticsearch.common.Strings.hasLength(\"foo\")"
Error:
{ "type": "script_exception", "reason": "Error compiling script d8fc6d7a038969a64764034a31e17fd0f336e955", "script_stack": [ "d8fc6d7a038969a64764034a31e17fd0f336e955: 1: unable to resolve class org.elasticsearch.common.Strings\n @ line 1, column 1.\n import org.elasticsearch.common.Strings; org.elasticsearch.common.Strings.hasLength(\"foo\")\n ^\n" ], "script": "import org.elasticsearch.common.Strings; org.elasticsearch.common.Strings.hasLength(\"foo\")", "lang": "groovy" }
This looks highly problematic. Upgrading from 2.x to 5.x will potentially break existing groovy scripts?
The text was updated successfully, but these errors were encountered:
@rjernst pointed me to the ClassPermission policy lock down in 2.2 so I'm closing this as a non-issue.
ClassPermission
Sorry, something went wrong.
No branches or pull requests
Uncovered this issue on master while investigating #17506
It appears the Groovy module may be using a different class loader which is causing class resolution errors during script compilation.
Reproduction:
Try the following in a
script_field
:Error:
This looks highly problematic. Upgrading from 2.x to 5.x will potentially break existing groovy scripts?
The text was updated successfully, but these errors were encountered: