Exception while invoking TaskListeners

I am getting exception while invoking task listeners(java class) assignment below is the exception

rg.camunda.bpm.engine.rest.exception: ENGINE-REST-HTTP500 org.camunda.bpm.engine.ProcessEngineException: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Could not find option with name js.syntax-extensions.'
	at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.invokeTaskListenerException(EnginePersistenceLogger.java:451)
	at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1085)
	at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:1030)
	at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.fireAssignmentEvent(TaskEntity.java:1215)
	at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.transitionTo(TaskEntity.java:1174)
	at org.camunda.bpm.engine.impl.bpmn.behavior.UserTaskActivityBehavior.performExecution(UserTaskActivityBehavior.java:62)
	at org.camunda.bpm.engine.impl.bpmn.behavior.TaskActivityBehavior.execute(TaskActivityBehavior.java:69)
	at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute$2.callback(PvmAtomicOperationActivityExecute.java:61)
	at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute$2.callback(PvmAtomicOperationActivityExecute.java:50)
	at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.continueIfExecutionDoesNotAffectNextOperation(PvmExecutionImpl.java:2039)
	at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:42)
	at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:31)
	at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:99)
	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.invokeNext(CommandInvocationContext.java:131)
	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performNext(CommandInvocationContext.java:111)
	at org.camunda.bpm.engine.impl.interceptor.CommandInvocationContext.performOperation(CommandInvocationContext.java:86)
	at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:634)
	at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:608)
	at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$6.callback(PvmExecutionImpl.java:1978)
	at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$6.callback(PvmExecutionImpl.java:1975)
	at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.continueExecutionIfNotCanceled(PvmExecutionImpl.java:2045)
	at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$8.callback(PvmExecutionImpl.java:2007)
	at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl$8.callback(PvmExecutionImpl.java:2004)
	at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.continueIfExecutionDoesNotAffectNextOperation(PvmExecutionImpl.java:2039)
	at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.dispatchDelayedEventsAndPerformOperation(PvmExecutionImpl.java:1998)
	at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.dispatchDelayedEventsAndPerformOperation(PvmExecutionImpl.java:1975)
	at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(PvmAtomicOperatio

Caused by: java.lang.IllegalArgumentException: Could not find option with name js.syntax-extensions.
	at com.oracle.truffle.polyglot.PolyglotEngineException.illegalArgument(PolyglotEngineException.java:128)
	at com.oracle.truffle.polyglot.OptionValuesImpl.failNotFound(OptionValuesImpl.java:283)
	at com.oracle.truffle.polyglot.PolyglotContextConfig.findObjectForContextOption(PolyglotContextConfig.java:289)
	at com.oracle.truffle.polyglot.PolyglotContextConfig.<init>(PolyglotContextConfig.java:135)
	at com.oracle.truffle.polyglot.PolyglotEngineImpl.createContext(PolyglotEngineImpl.java:1629)
	at org.graalvm.polyglot.Context$Builder.build(Context.java:1627)
	at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.createDefaultContext(GraalJSScriptEngine.java:304)
	at com.oracle.truffle.js.scriptengine.GraalJSBindings.initContext(GraalJSBindings.java:89)
	at com.oracle.truffle.js.scriptengine.GraalJSBindings.requireContext(GraalJSBindings.java:84)
	at com.oracle.truffle.js.scriptengine.GraalJSBindings.entrySet(GraalJSBindings.java:170)
	at java.util.AbstractMap.containsKey(AbstractMap.java:144)
	at org.camunda.bpm.engine.impl.scripting.engine.ScriptBindings.containsKey(ScriptBindings.java:106)
	at javax.script.SimpleScriptContext.getAttribute(SimpleScriptContext.java:144)
	at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.createSource(GraalJSScriptEngine.java:401)
	at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:397)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
	at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluateScript(SourceExecutableScript.java:125)
	at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluate(SourceExecutableScript.java:65)
	at org.camunda.bpm.engine.impl.scripting.ExecutableScript.execute(ExecutableScript.java:63)
	at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:99)
	at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:87)
	at org.camunda.bpm.engine.impl.delegate.ScriptInvocation.invoke(ScriptInvocation.java:47)
	at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58)
	at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92)
	at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63)
	at org.camunda.bpm.engine.impl.task.listener.ScriptTaskListener.notify(ScriptTaskListener.java:45)
	at org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:45)
	at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58)
	at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92)
	at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63)
	at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1099)
	at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1079)

can you please format your stack trace so that it’s more readable?

@niall Done !!

Can you also upload your model and give details about your Camunda setup, like version and distro etc.

Camunda version 7.16
Java Version 1.8.0_291-b10
We are running locally with 1.8.0_291-b10 it works. on kubernetes we are running with graalvm where we are getting the exception as soon as the tasklisteners with java script are encountered
camunda error.txt (25.0 KB)

@Niall thanks for your help. We had to explicitly provide the DefaultScriptEngineResolver and it workd