Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-17369

Ignore Script Batch Testing warning with jdk 17 since the JavaScript Engine was removed in JDK15

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • Batch, Test Suite
    • ---
    • ---

    Description

      Batch Script test gives warning with jdk17 ...

      18:56:53,267 WARN  [org.jberet] (Batch Thread - 1) JBERET000001: Failed to run batchlet org.jberet.job.model.RefArtifact@2f664ed: jakarta.batch.operations.BatchRuntimeException: JBERET000637: Invalid script attributes: type = javascript, src = null
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.job.model.Script.getEngine(Script.java:189)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.runtime.runner.ScriptArtifactBase.<init>(ScriptArtifactBase.java:47)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.runtime.runner.ScriptBatchlet.<init>(ScriptBatchlet.java:27)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.runtime.runner.AbstractRunner.createArtifact(AbstractRunner.java:152)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.runtime.runner.BatchletRunner.run(BatchletRunner.java:68)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.runtime.runner.StepExecutionRunner.runBatchletOrChunk(StepExecutionRunner.java:226)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:142)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:170)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:94)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:58)
      	at org.wildfly.extension.batch.jberet@28.0.0.Beta1-SNAPSHOT//org.wildfly.extension.batch.jberet.deployment.BatchEnvironmentService$WildFlyBatchEnvironment$1.run(BatchEnvironmentService.java:177)
      	at org.wildfly.extension.request-controller@20.0.0.Beta3//org.wildfly.extension.requestcontroller.ControlPointTask.run(ControlPointTask.java:46)
      	at org.wildfly.extension.batch.jberet@28.0.0.Beta1-SNAPSHOT//org.wildfly.extension.batch.jberet.thread.pool.WildFlyJobExecutor$1.run(WildFlyJobExecutor.java:72)
      	at org.jberet.jberet-core@2.1.1.Final//org.jberet.spi.JobExecutor$1.run(JobExecutor.java:100)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      	at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
       

      This appears to be caused by [1][2] , so the Nashorn JavaScript Engine was deprecated in JDK11 and then removed in JDK15, so JDK17 would no longer have the JavaScript Engine which would cause issues for anything trying to use it.

      [1] https://openjdk.org/jeps/335 - JEP 335: Deprecate the Nashorn JavaScript Engine - Deprecated in JDK11

      [2] https://openjdk.org/jeps/372 - JEP 372: Remove the Nashorn JavaScript Engine - Removed in JDK15

       

      Attachments

        Issue Links

          Activity

            People

              rchakrab Ranabir Chakraborty
              rchakrab Ranabir Chakraborty
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: