Unable to find Java Script resource at path

Hi

I have deployed my process application as a war file. It gives me the below error when I try to complete a task that invokes Task Listener which calls an external JavaScript file.

Caused by: org.camunda.bpm.engine.exception.NotFoundException: ENGINE-09024 Unable to find resource at path openWorkId.js. 

26-Apr-2021 00:25:38.416 SEVERE [http-nio-8080-exec-6] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'ENGINE-09024 Unable to find resource at path openWorkId.js'
	org.camunda.bpm.engine.ProcessEngineException: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'ENGINE-09024 Unable to find resource at path openWorkId.js'
		at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.invokeTaskListenerException(EnginePersistenceLogger.java:451)

I could see that this js file is deployed along with the bpmn files and is able to see it in Cockpit. I also have added js in processes.xml file.

This error will be resolved if make some small changes in the bpmn file and deploy the same war again. I copy the war file to webapps folder of tomcat. All other externally referenced javascript files from this bpmn files are invoked successfully. I also tried to restart the tomcat server but in vain

Please help me

Regards,
Prasad

You need to upload your bpmn file, give us some details on the version of Camunda you’re using.

@Niall I am using version 7.14. Since it is a part our business workflow I am not able to upload it. Let me try to create a portion of it that can replicate this behavior. Can you give me some pointers where I can start off. This javascript file is located in src/main/resources folder

Hi @Niall ,

I was able to resolve this issue by adding classpath:// in front of the script name. So now I am referring the external script as classpath://openWorkId.js instead of just openWorkId.js. Although both represents the same as per the documentation, this somehow resolved the issue.

Regards,
Prasad

1 Like

Hi @prasadps , I have now the same problem. Can you tell me if you add the event type of Task Listener as create or something different? Because I also try to add classpath:// before my path, but it doesn’t work. Maybe, do you add “classpath://” also in the real path in the folder where you have the file?
Thank you,
Elena