-
Notifications
You must be signed in to change notification settings - Fork 10
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
Javascript functions don't work #32
Comments
Exactly same issue observed even with the out of box Javascript sample. I'm got the following error - Reported in SO : https://stackoverflow.com/questions/62224863/siddhi-5-1-2-not-able-to-use-javascript-functions |
@eportico what is the docker image tag that you are referring to? |
@BuddhiWathsala I am observing the same issue with the tag : siddhiio/siddhi-runner-ubuntu:5.1.2 |
docker image latest from hub.docker ( the 5.1.2 ) |
Tooling and Runner. Both don't work javascript functions |
Hi @BuddhiWathsala The JS functions are working fine on using the non-slim version of base JDK image. I have raised the pull request with the required changes. Requesting your review for the same. |
Hi @BuddhiWathsala Any help on the above pull merge would be helpful. |
Description:
The javascript functions don't work in docker images. This feature is fine in console running, but if fail in docker
SLAMTransform.siddhi - Siddhi App 'SLAMTransform' is in faulty state.
[2020-06-05_15-01-56_305] ERROR {io.siddhi.distribution.editor.core.internal.DebugRuntime} - Siddhi App 'SLAMTransform' is in faulty state. (Encoded)
io.siddhi.core.exception.SiddhiAppCreationException: Error on 'SLAMTransform' @ Line: 7. Position: 325, near 'define function transform[JavaScript] return object {
function transformOne(measure) {
console.log(measure);
return {_id:measure.id};
}
}'. Could not initialize class io.siddhi.extension.script.js.EvalJavaScript
at io.siddhi.core.util.ExceptionUtil.populateQueryContext(ExceptionUtil.java:43)
at io.siddhi.core.util.parser.helper.DefinitionParserHelper.addFunction(DefinitionParserHelper.java:255)
at io.siddhi.core.util.SiddhiAppRuntimeBuilder.defineFunction(SiddhiAppRuntimeBuilder.java:234)
at io.siddhi.core.util.parser.SiddhiAppParser.defineFunctionDefinitions(SiddhiAppParser.java:351)
at io.siddhi.core.util.parser.SiddhiAppParser.parse(SiddhiAppParser.java:233)
at io.siddhi.core.SiddhiManager.createSiddhiAppRuntime(SiddhiManager.java:85)
at io.siddhi.core.SiddhiManager.createSiddhiAppRuntime(SiddhiManager.java:95)
at io.siddhi.distribution.editor.core.internal.DebugRuntime.createRuntime(DebugRuntime.java:201)
at io.siddhi.distribution.editor.core.internal.DebugRuntime.(DebugRuntime.java:56)
at io.siddhi.distribution.editor.core.internal.DebugProcessorService.start(DebugProcessorService.java:38)
at io.siddhi.distribution.editor.core.internal.EditorMicroservice.start(EditorMicroservice.java:761)
at io.siddhi.distribution.editor.core.internal.EditorMicroservice.startWithVariables(EditorMicroservice.java:781)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.wso2.msf4j.internal.router.HttpMethodInfo.invokeResource(HttpMethodInfo.java:187)
at org.wso2.msf4j.internal.router.HttpMethodInfo.invoke(HttpMethodInfo.java:143)
at org.wso2.msf4j.internal.MSF4JHttpConnectorListener.dispatchMethod(MSF4JHttpConnectorListener.java:218)
at org.wso2.msf4j.internal.MSF4JHttpConnectorListener.lambda$onMessage$58(MSF4JHttpConnectorListener.java:129)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.siddhi.extension.script.js.EvalJavaScript
at sun.reflect.GeneratedConstructorAccessor57.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at io.siddhi.core.util.SiddhiClassLoader.loadClass(SiddhiClassLoader.java:32)
at io.siddhi.core.util.SiddhiClassLoader.loadExtensionImplementation(SiddhiClassLoader.java:48)
at io.siddhi.core.util.parser.helper.DefinitionParserHelper.addFunction(DefinitionParserHelper.java:247)
... 21 more
The text was updated successfully, but these errors were encountered: