Uploaded image for project: 'Server Deployments and Scale'
  1. Server Deployments and Scale
  2. SCALE-4

Docker image does not support NashornScriptEngine/JavascriptEngine

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • None
    • master
    • Environment - Docker
    • None
    • Severity 2 - Major

      We tried to create a report of our issues with Xporter. We had issues and contacted Xporter support. They helped us triage the issue. The issue was that the Java version used in the Jira Docker images does not support NashornScriptEngine or JavascriptEngine. Our issue is solved when we manually update the Java version in the container, but we do not want to use such a heavily modified image.
      The issue appears with JDK version 8u222 which is used in the official image. We updated to 8u232 which resolved our problem.

      Can the official image be updated, or can an additional tag be created which supports the classes NashornScriptEngine or JavascriptEngine?

            [SCALE-4] Docker image does not support NashornScriptEngine/JavascriptEngine

            Hi t.bohn,

            Thanks for the report. After some discussion we've changed the default images to use the full version of the JDK. If you pull the latest versions they should now work,

            Cheers,
            Steve

            Steve Smith (Inactive) added a comment - Hi t.bohn , Thanks for the report. After some discussion we've changed the default images to use the full version of the JDK. If you pull the latest versions they should now work, Cheers, Steve

            TB added a comment -

            Hi Dave,

            I pulled the image again and it did update to 8u232, but Xporter still didn't work properly. After some tinkering around I realized that it worked after my update not because I updated the Version, but because I used the full version downloaded from https://adoptopenjdk.net/. The Problem seems to come from the slim version of adoptopenjdk.

            If I replace

            FROM adoptopenjdk/openjdk8:slim
            

            with

            FROM adoptopenjdk:8-jdk-hotspot
            

            in the Jira Dockerfile it works as expected. It seems that the slimming of the Java image removes NashornScriptEngine (see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/8/jdk/ubuntu/slim-java.sh#L106)

            Can an alternative tag with the full JDK be provided? I saw an increase of ~110MB in image size which would be acceptable for us.

            Thanks for the help,

            Thomas

            TB added a comment - Hi Dave, I pulled the image again and it did update to 8u232, but Xporter still didn't work properly. After some tinkering around I realized that it worked after my update not because I updated the Version, but because I used the full version downloaded from https://adoptopenjdk.net/ . The Problem seems to come from the slim version of adoptopenjdk. If I replace FROM adoptopenjdk/openjdk8:slim with FROM adoptopenjdk:8-jdk-hotspot in the Jira Dockerfile it works as expected. It seems that the slimming of the Java image removes NashornScriptEngine (see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/8/jdk/ubuntu/slim-java.sh#L106 ) Can an alternative tag with the full JDK be provided? I saw an increase of ~110MB in image size which would be acceptable for us. Thanks for the help, Thomas

            Dave Chevell added a comment - - edited

            Hi t.bohn,

            Short version:

            Pull the atlassian/jira-*:* image you want to use again, you should find it's now shipping Java 232!

            Long version:

            As we build images for new product releases we will build from the latest base images. Right now, products that have shipped a release since the base images were updated will ship Java 232:

            $ docker run --rm -it atlassian/confluence-server:latest java -version
            openjdk version "1.8.0_232"
            OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
            OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)
            

            Jira hasn't shipped a new release in between then and now, so the next version to be published will ship it automatically.

            Older versions are not rebuilt automatically, but only under the following conditions:

            1. When we make changes to the underlying template (fixing a bug or adding a feature)
            2. When we manually trigger a rebuild of all images, e.g. in response to a CVE

            That being the case I've manually triggered a rebuild, which has since completed. You should now be able to pull whichever Jira image tag you're using, and it will be running Java 232.

            Let us know how you go!

            Cheers,

            Dave

            Dave Chevell added a comment - - edited Hi t.bohn , Short version: Pull the atlassian/jira-*:* image you want to use again, you should find it's now shipping Java 232! Long version: As we build images for new product releases we will build from the latest base images. Right now, products that have shipped a release since the base images were updated will ship Java 232: $ docker run --rm -it atlassian/confluence-server:latest java -version openjdk version "1.8.0_232" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode) Jira hasn't shipped a new release in between then and now, so the next version to be published will ship it automatically. Older versions are not rebuilt automatically, but only under the following conditions: When we make changes to the underlying template (fixing a bug or adding a feature) When we manually trigger a rebuild of all images, e.g. in response to a CVE That being the case I've manually triggered a rebuild , which has since completed. You should now be able to pull whichever Jira image tag you're using, and it will be running Java 232. Let us know how you go! Cheers, Dave

              dchevell Dave Chevell
              f47f7bf35c21 TB
              Affected customers:
              0 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: