-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScript templating broken in docker after Java 17 upgrade: Missing nashorn #1326
Comments
There could certainly be multiple versions, one with an older JVM version and the default with a later version. The reason I say that is that the later Java versions have better handling of memory and fix some JDK bugs with TLS, etc. |
I do agree however that it would make sense to have a docker container version that supported JS templating. |
I get the following exception for httptemplate responses in 5.12.0 and 5.13.0
Is there any way to fix this or has someone taken an initiative from your side to fix this issue in the latest version ? |
Same problem, templating is a great feature 😢 |
@Adm28 there error looks like there is a bug in your template, do you know that isn't the case? Can you please provide your template (i.e. the expectation) and how you are submitting it so I can check where the issue is. |
I've created this backlog item: https://trello.com/c/MsmlhWJI/191-create-docker-image-with-support-for-js-templating-and-documentation so I'm going to close this issue and will aim to provide a docker container that supports templating and documentation of how to do this without the docker container |
Looking forward for it. |
Any update on this ticket? |
I came across this issue also. My workaround at the moment was to use version 5.12.0. |
It makes impossible right now for M1 users to use the newer versions of mockserver (#819), since this bug is not resolved :( |
Faced this issue also. |
Describe the issue
Javascript-templated expectations seem to no longer work after the upgrade to Java 17 in 5.13.1, due to the Nashorn JS engine no longer being included in the JVM.
Normally I would be able to use a different JVM, but for the pre-built docker images I think these should be included to work out of the box!
What you are trying to do
Setting up Javascript-templated expectations to evaluate the request at runtime.
MockServer version
5.13.2
To Reproduce
Steps to reproduce the issue:
Run Mockserver using docker-compose directly from published images from docker hub:
Create a request using JS templating:
Call the expected endpoint. Notice a 404 response and the error in the mockserver docker compose log. See below.
Expected behaviour
JS templated response to be evaluated and returned without errors.
MockServer Log
The text was updated successfully, but these errors were encountered: