Nashorn cast error when running in jdk11
See original GitHub issueCast error using karate.merge when running in jdk11 It run fine on jdk8
Scenario: tests karate.merge on jdk11
* def req = {}
* def authHeader = { 'Basic': 'xxx' }
* def headers = karate.merge(req.headers, authHeader)
[ERROR] Failures:
[ERROR] UsersRunner.testUsers users.feature:10 - javascript evaluation failed: karate.merge(req.headers, authHeader), Cannot cast jdk.nashorn.internal.runtime.Undefined to java.util.Map
Sample project included karate-issue.zip
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Nashorn cast error when running in jdk11 · Issue #1163 - GitHub
Cast error using karate.merge when running in jdk11 It run fine on jdk8 Scenario: ... authHeader), Cannot cast jdk.nashorn.internal.runtime.
Read more >Nashhorn engine fails on Java 11 with "unknown call type" error
I have a JS script which is failing when evaluated using Nashorn engine from Java. This code works fine on Java 8 but...
Read more >ClassCastException: cannot cast jdk.nashorn.internal.scripts.JO
ACTUAL - ClassCastException ERROR MESSAGES/STACK TRACES THAT OCCUR : Exception in thread "main" java.lang.ClassCastException: Cannot cast jdk.nashorn.internal.
Read more >Under certain conditions, GraalJS is slower than Nashorn : r/java
I discovered that Running GraalJS on stock JDK11 project a few days ago while investigating GraalJS for a Windows-hosted project I was working ......
Read more >jdk.scripting.nashorn (Java SE 11 & JDK 11 )
Provides the implementation of Nashorn script engine and the runtime environment for programs written in ECMAScript 5.1. Nashorn is a runtime environment ...
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
@ivangsa it is up to you how you want to proceed. feel free to contribute a PR and fix this. Nashorn has slight differences across OS and JDK versions, you ran into one of them. we plan to move to Graal - so I’m not investing time in this. closing as
wontfix
@ivangsa and please do test on 1.0 to avoid surprises: https://github.com/intuit/karate/wiki/1.0-upgrade-guide