Giter VIP home page Giter VIP logo

Comments (10)

 avatar commented on June 1, 2024 1

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.

 avatar commented on June 1, 2024

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.

 avatar commented on June 1, 2024

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.

brayjamin avatar brayjamin commented on June 1, 2024

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.

wwlib avatar wwlib commented on June 1, 2024

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.

 avatar commented on June 1, 2024

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:
image

The java version being used for this is jdk-17.0.1

from grakkit.

wwlib avatar wwlib commented on June 1, 2024

OK. As you suggested, with openjdk:17-oraclelinux8 & paper-1.18.1-155.jar Grakkit works.

(https://github.com/wwlib/docker-minecraft/blob/master/minecraft-server-1.18.1-openjdk17/Dockerfile.openjdk17)

[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.

 avatar commented on June 1, 2024

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.

wwlib avatar wwlib commented on June 1, 2024

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.

brayjamin avatar brayjamin commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.