[Bug]: mvn compile fails because jdk.nashorn.api.scripting does not exist
See original GitHub issueRelated Template(s)
cdc-parent
What happened?
mvn clean compile fails probably because nashorn package is deprecated but google-cloud-teleport-java still uses it.
Beam Version
Newer than 2.35.0
Relevant log output
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project google-cloud-teleport-java: Compilation failure
[ERROR] /DataflowTemplates/src/main/java/com/google/cloud/teleport/templates/common/JavascriptTextTransformer.java:[38,33] package jdk.nashorn.api.scripting does not exist
[ERROR]
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project google-cloud-teleport-java: Compilation failure /DataflowTemplates/src/main/java/com/google/cloud/teleport/templates/common/JavascriptTextTransformer.java:[38,33] package jdk.nashorn.api.scripting does not exist
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to make jdk.nashorn.api.scripting.JSObject visible in plugin
I have an Eclipse RCP that interacts with java script. Now with Java 8, nashorn is used and code that depended on org.mozilla.javascript...
Read more >jdk.nashorn.api.scripting.NashornException Maven / Gradle / Ivy
jdk.nashorn.api.scripting.NashornException maven / gradle build tool code. The class is part of the package ➦ Group: com.xenoamess ➦ Artifact: nashorn ...
Read more >Could not initialize class org.openjdk.nashorn.internal.runtime ...
Any small application with Java + Nashorn... EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Should be executed JavaScript code without issues. ACTUAL -...
Read more >569663 – Unable to build code using Nashorn with Java 11
Build works fine on Jenkins without it (just like on Travis CI, where this profile was not used as well), but it fails...
Read more >JDK-8159037 JavaScript execution with Nashorn fails ... - Bug ID
raml1.java.patser.test. ... script.ScriptException: ReferenceError: "console" is not defined in <eval> at line number 5909 at jdk.nashorn.api.scripting.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Nashorn was removed in JDK 15, so my guess is that you are using JDK 15 or above. It should work if you downgrade to using JDK 8/11.
Which java version are you using?
mvn -version should show which JVM maven uses (it may be not the one used when you simply type java)