Skip to content

Commit

Permalink
Merge pull request #1803 from cdapio/CDAP-20778-fix-javascript-transf…
Browse files Browse the repository at this point in the history
…orm-java11

use the plugin classloader for loading scripting engin
  • Loading branch information
albertshau authored Aug 14, 2023
2 parents 92e9cbe + 6d2fd3d commit 339807e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ private Object decodeUnion(Object object, List<Schema> schemas) {
}

private void init(@Nullable TransformContext context, FailureCollector collector) {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngineManager manager = new ScriptEngineManager(getClass().getClassLoader());
engine = manager.getEngineByName("JavaScript");
try {
engine.eval(ScriptConstants.HELPER_DEFINITION);
Expand Down

0 comments on commit 339807e

Please sign in to comment.