question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoClassDefFoundError: jdk/nashorn/api/scripting/NashornScriptEngineFactory when running locally

See original GitHub issue

Catching this exception in a project which uses Nashorn when trying to run gradle appengineRun. But deployed version works fine!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:25 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
mpoehlercommented, Sep 21, 2018

@vh Is that already fixed? I probably ran into this again here: https://github.com/jknack/handlebars.java/issues/652

new ScriptEngineManager().getEngineByName("nashorn");

returns null in local devserver, but works in tests and also in production.

I created a dedicated repo for that issue here: https://github.com/mpoehler/hbs-test

Can you give me a hint regarding the classloading issue in the devserver?

1reaction
vhcommented, Nov 22, 2017

@loosebazooka Yes. I’ve found that it is problem with local dev classloader. Not gradle plugin issue. Thanks for help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NoClassDefFoundError: jdk/nashorn/api/scripting ...
It gives an error: java.lang.NoClassDefFoundError: jdk/nashorn/api/scripting/NashornScriptEngineFactory. I tried to modify the main file and ...
Read more >
Getting java.lang.NoClassDefFoundError: jdk/nashorn/api ...
We have written webservice tests in karate and able to run the tests on local mac machine but currently getting the error java.lang....
Read more >
java.lang.NoClassDefFoundError: jdk/nashorn/api/scripting ...
Catching this exception in a project which uses Nashorn when trying to run gradle appengineRun . But deployed version works fine! See More....
Read more >
src/jdk/nashorn/api/scripting/ScriptEngineTest.java
i.e., somehow a stale nashorn.jar is used to run tests using new test sources. Without that scenario, I can explain the scenario reported....
Read more >
How to resolve Java Script editor ClassNotFoundException ...
java.lang.NoClassDefFoundError: jdk.nashorn.internal.runtime.ECMAException at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(Unknown Source) at blah, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found