Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8289305

nashorn throwing ClassNotFound Exception

    XMLWordPrintable

Details

    Description

      ADDITIONAL SYSTEM INFORMATION :
      linux/windows

      A DESCRIPTION OF THE PROBLEM :
      our application uses openjdk11.0.14 and we get this ClassNotfound exception while it trying to write to logger.
      When we are executing BPflows using camunda, it is throwing the below exception
      . *The same was working in java 8 , post upgrade to 11 we are getting this error.*
      The libraries related to apache logging are in the classpath
      Could you please help with this.

      ENGINE-16004 Exception while closing command context: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager.getLogger: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager.getLogger
      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)

      REGRESSION : Last worked in version 8

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Java 11.0.14 with Camunda 7.16.0

      We are using wildfly-23.0.2.Final and path of the camunda modules are in this folder. \wildfly-23.0.2.Final\modules\org\camunda

      Created workflow with start node->script Task-end node.
      In script node I have added below code.

      var log=org.apache.logging.log4j.LogManager.getLogger(“XXX.utilities.javascript.JavaScriptLogger”);
      log.debug(“Test Log”);

      When I run BPFlow getting below error.


      FREQUENCY : always


      Attachments

        Activity

          People

            tongwan Andrew Wang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: