Skip to content
New issue

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

[Bug]: The script transform randomly fails while obtaining scripting language #3729

Closed
fraserward opened this issue Mar 18, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@fraserward
Copy link

Apache Hop version?

2.7.0

Java version?

opernjdk 11.0.22

Operating system

Linux

What happened?

I run the same code every few hours and 95% of the time it works, but 5% of the time I get an error on the script transform about loading the engine. This is with both python and EMCAScript language as the script engine.

ERROR: Error obtaining scripting engine for language ECMAScript
ERROR: java.util.ConcurrentModificationException
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1135)
at org.apache.hop.pipeline.transforms.script.ScriptUtils.populateEngineFactoryMap(ScriptUtils.java:117)
at org.apache.hop.pipeline.transforms.script.ScriptUtils.getScriptEngineManager(ScriptUtils.java:94)
at org.apache.hop.pipeline.transforms.script.ScriptUtils.populateEngineFactoryMap(ScriptUtils.java:112)
at org.apache.hop.pipeline.transforms.script.ScriptUtils.createNewScriptEngineByLanguage(ScriptUtils.java:59)
at org.apache.hop.pipeline.transforms.script.Script.init(Script.java:691)
at org.apache.hop.pipeline.transform.TransformInitThread.run(TransformInitThread.java:66)
at java.base/java.lang.Thread.run(Thread.java:829

and

ERROR: Error obtaining scripting engine for language python
ERROR: java.util.ConcurrentModificationException
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1135)
at org.apache.hop.pipeline.transforms.script.ScriptUtils.populateEngineFactoryMap(ScriptUtils.java:117)
at org.apache.hop.pipeline.transforms.script.ScriptUtils.getScriptEngineManager(ScriptUtils.java:94)
at org.apache.hop.pipeline.transforms.script.ScriptUtils.populateEngineFactoryMap(ScriptUtils.java:112)
at org.apache.hop.pipeline.transforms.script.ScriptUtils.createNewScriptEngineByLanguage(ScriptUtils.java:59)
at org.apache.hop.pipeline.transforms.script.Script.init(Script.java:691)
at org.apache.hop.pipeline.transform.TransformInitThread.run(TransformInitThread.java:66)
at java.base/java.lang.Thread.run(Thread.java:829)

Issue Priority

Priority: 3

Issue Component

Component: Transforms

@bamaer
Copy link
Contributor

bamaer commented Mar 20, 2024

@bamaer bamaer self-assigned this Mar 20, 2024
hansva added a commit that referenced this issue Mar 23, 2024
fix ConcurrentModificationExceptions in script transforms. #3729
@hansva hansva added this to the 2.9 milestone Mar 23, 2024
@hansva hansva closed this as completed Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants