Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-13687

java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Cannot Reproduce
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • camunda.org
    • None

      Created workflow with start node->script Task-end node.
      In script node i have added below code.
      In java 8,

      var log = org.apache.commons.logging.LogFactory.getLog("a.b.javascript.JavaScriptLogger");
      log.debug(" ============================= Staring Execution: ================== ");

      This is working properly in script node. Logs are printing in the log file

      In java 11, same code is not working. It is throwing below exception

      2021-06-30 05:35:55,645 ERROR [stderr] (pool-9-thread-44) Warning: Nashorn engine is planned to be removed from a future JDK release
      2021-06-30 05:35:55,672 ERROR [org.camunda.bpm.engine.context] (pool-9-thread-44) ENGINE-16006 BPMN Stack Trace:
      oryx_27322EF5-B7BE-4F4C-9D31-7847DF9CDEAE (activity-execute, ProcessInstance[0a80a820-d965-11eb-b227-fa163e25b144])
      oryx_27322EF5-B7BE-4F4C-9D31-7847DF9CDEAE, name=BPMNScriptTask_2
      ^

      oryx_D2552B6E-1169-493E-AAC5-162799FB21FC, name=BPMNStartEvent_1

      2021-06-30 05:35:55,673 ERROR [org.camunda.bpm.engine.context] (pool-9-thread-44) ENGINE-16004 Exception while closing command context: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory.getLog: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory.getLog
      at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:531)
      at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
      at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
      at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
      at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:162)
      at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
      at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluateScript(SourceExecutableScript.java:125)
      at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluate(SourceExecutableScript.java:65)
      at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.scripting.ExecutableScript.execute(ExecutableScript.java:63)
      at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:101)
      at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:87)
      at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.delegate.ScriptInvocation.invoke(ScriptInvocation.java:47)
      at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58)

      It is not loading the class org.apache.commons.logging.LogFactory. But class is available in the classpath.

      Could someone help to resolve this issue.

      Appreciate your help on this.

      Regards,
      Poornima

        This is the controller panel for Smart Panels app

              miklas.boskamp Miklas Boskamp
              pbaddi pbaddi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: