Open apple-corps opened 2 years ago
Just noticing the top of the dockerfile mentions the Scripting https://github.com/cameronkerrnz/logstash-plugin-dev/blob/9efe7d1f5ae1faec98db50b6f50f15cc7438e3f2/Dockerfile#L5 suggesting it works. So we might also be solving a bug in the container https://hub.docker.com/r/cameronkerrnz/logstash-plugin-dev . Also if you have some friends from logstash they might know if there are some issues with the setup.
Using JDK 1.8 vs 1.11 and I didn't see the error:
https://github.com/cameronkerrnz/logstash-plugin-dev/issues/5#issuecomment-982284743
JDK 8 (the 1.x numbers are generally not used much anymore) would not have this problem because all of the JDK is always available there.
JDK 11 would have this problem if it could not find the java.scripting module to activate. This should only happen if the JDK has been customized to remove that module.
You can check to see what modules are being used by looking in JDK_HOME/jmods. Here's my local install of JDK 11:
$ ls /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/jmods/
java.base.jmod java.scripting.jmod jdk.attach.jmod jdk.internal.opt.jmod jdk.jlink.jmod jdk.rmic.jmod
java.compiler.jmod java.se.jmod jdk.charsets.jmod jdk.internal.vm.ci.jmod jdk.jshell.jmod jdk.scripting.nashorn.jmod
java.datatransfer.jmod java.security.jgss.jmod jdk.compiler.jmod jdk.internal.vm.compiler.jmod jdk.jsobject.jmod jdk.scripting.nashorn.shell.jmod
java.desktop.jmod java.security.sasl.jmod jdk.crypto.cryptoki.jmod jdk.internal.vm.compiler.management.jmod jdk.jstatd.jmod jdk.sctp.jmod
java.instrument.jmod java.smartcardio.jmod jdk.crypto.ec.jmod jdk.jartool.jmod jdk.localedata.jmod jdk.security.auth.jmod
java.logging.jmod java.sql.jmod jdk.dynalink.jmod jdk.javadoc.jmod jdk.management.agent.jmod jdk.security.jgss.jmod
java.management.jmod java.sql.rowset.jmod jdk.editpad.jmod jdk.jcmd.jmod jdk.management.jfr.jmod jdk.unsupported.desktop.jmod
java.management.rmi.jmod java.transaction.xa.jmod jdk.hotspot.agent.jmod jdk.jconsole.jmod jdk.management.jmod jdk.unsupported.jmod
java.naming.jmod java.xml.crypto.jmod jdk.httpserver.jmod jdk.jdeps.jmod jdk.naming.dns.jmod jdk.xml.dom.jmod
java.net.http.jmod java.xml.jmod jdk.internal.ed.jmod jdk.jdi.jmod jdk.naming.rmi.jmod jdk.zipfs.jmod
java.prefs.jmod jdk.accessibility.jmod jdk.internal.jvmstat.jmod jdk.jdwp.agent.jmod jdk.net.jmod
java.rmi.jmod jdk.aot.jmod jdk.internal.le.jmod jdk.jfr.jmod jdk.pack.jmod
Note that java.scripting.jmod does exist in that dir.
I'll take a look. We shouldn't expect them to be removed because we see the JDK package unless it was removed by centos (doubtful)
Debugging my issue running logstash rspec tests currently using https://github.com/cameronkerrnz/logstash-plugin-dev as the base container image for my dockerfile. After enabling logging I see
Cannot initialize scripting support because this JRE does not support it. java.lang.NoClassDefFoundError: javax/script/ScriptEngineFactory
. Log shared in another issue:https://github.com/logstash-plugins/logstash-filter-aggregate/issues/119#issuecomment-981384890
jruby / java details
First line of linked log ^^^ says
Using system java: /usr/bin/java
If I'm correct then the JDK installation comes from https://github.com/cameronkerrnz/logstash-plugin-dev/blob/9efe7d1f5ae1faec98db50b6f50f15cc7438e3f2/Dockerfile#L12 since I'm using that container as a base, but I could be wrong.