Comments (10)
Explanation: Grakkit packages Graal JS engine in the JAR, when it patches those classes into the classloader it can conflict with GraalVM's existing set of GraalJS classes which cancel each other out.
from grakkit.
Especially odd because Grakkit doesn't use ScriptEngine, it packages the GraalJS library and imports those classes -- Grakkit is not a Nashorn-dependant plugin. I feel this issue may have some other cause, we've seen the error before in older versions.
from grakkit.
If grakkit.Grakkit.driver
is null, the main instance isn't being initialized. I will look into this to see what can be done.
from grakkit.
Grakkit should work flawlessly on 1.18+. I agree with hb, it definitely looks like there's a different issue at play here.. I would recommend checking if the plugins/grakkit and grakkit/index.js files exist and have appropriate permissions, and additionally make sure you're using the default java 17+ jdk if you're currently using something like GraalVM (ironically enough, Grakkit has had mixed success when the server starts from it).
Keep us posted!
from grakkit.
It does work flawlessly with the spigot-1.17.1.jar and paper-1.17.1.jar. However, using the spigot-1.18.1.jar generates the error(s) - with the same index.js, plugin, etc.
I am curious to to know it you are using it successfully with 1.18.1 ?
If you can see https://hub.spigotmc.org/jira/browse/SPIGOT-6902 there is a discussion of a change in the way plugins and their dependencies are loaded between 1.17.1 and 1.18.1 which may explain the error(s).
There is also a newly opened bug related to the plugin class loader: https://hub.spigotmc.org/jira/browse/SPIGOT-6904
- [ "Especially odd because Grakkit doesn't use ScriptEngine, it packages the GraalJS library and imports those classes" ]
That's cool!
from grakkit.
We in fact we have several servers running 1.18.1 with the latest Grakkit version installed. Here is me running some commands in the console of one such server:
The java version being used for this is jdk-17.0.1
from grakkit.
OK. As you suggested, with openjdk:17-oraclelinux8 & paper-1.18.1-155.jar Grakkit works.
[02:10:43 INFO]: This server is running Paper version git-Paper-155 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 99cf01f)
So it looks like I stumbled onto a conflict between ghcr.io/graalvm/graalvm-ce:java17-21.3 & paper-1.18.1-155.jar
from grakkit.
Ah, using GraalVM as your JVM is the actual issue here. As counter-intuitive as it sounds, Grakkit and GraalVM are incompatible. You have to run Grakkit on JDK.
from grakkit.
OK. Thanks!
The fact that it works using spigot-1.17.1 but not 1.18.1 made it seem like it might be related to the ScriptEngine issue.
But now that I understand Grakkit better I like its approach vs. using ScriptEngine
from grakkit.
Yeah, it's odd GraalVM worked in 1.17 but not 1.18.. I'm curious if what you linked did have something to do with that.
from grakkit.
Related Issues (20)
- HTTPclient Issues HOT 1
- Graal now supports nodejs natively in 21.1 HOT 1
- Grakkit and Coreprotect not working well together HOT 3
- Need to generate updated TypeScript docs for PaperMC versions past 1.16 HOT 1
- stdlib.file() doesnt supports utf-8 HOT 2
- How does `fetch` work? HOT 5
- Minor display version mismatch HOT 3
- Grakkit failing to load on 5.0.6, Paper MC 1.18.1 HOT 2
- Add support for running with GraalVM (alternate GraalVM release) HOT 1
- Support needed for multiple config file formats! HOT 16
- Fetch is not a complete implementation HOT 1
- How to extend PluginBase? HOT 3
- error with grakkit HOT 2
- Grakkit doesn't report all errors
- Grakkit's JavaScript ticker (chain) can fail and does not resume HOT 1
- Grakkit 5.0.6 introduced "java.lang.IllegalStateException: zip file closed"
- Grakkit throws "This Context is already terminated" when running contexts and using Grakkit reload
- Provide the ability to disable certain features of stdlib core
- TypeError: instantiate on org.bukkit.entity.Villager failed due to: Message not supported.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grakkit.