Code Monkey home page Code Monkey logo

Comments (3)

Geolykt avatar Geolykt commented on May 17, 2024

After a few coincidences I was able to identify that jar signing is at fault (or at least I believe, haven't run the (tests)) yet.
To anyone that has the same issue and also has no idea what to do, you have to shade the dependencies and use one of the solutions provided at https://stackoverflow.com/questions/34855649/
You have also to relocate the packages, so in full it might look something like

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <configuration>
                            <relocations>
                                <!-- Spongepowered bricks the Minestom classloader -->
                                <relocation>
                                    <pattern>org.spongepowered</pattern>
                                    <shadedPattern>org.borkpowered</shadedPattern>
                                </relocation>
                            </relocations>
                            <!-- The following files are here to prevent the class(es) from not being openable -->
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Edit Nr. 1: Never mind, that is a completely other issue in itself that just happened to be able to be reproducible with the same artifact.

Edit Nr. 2: After reproducing this even when the dependency is shaded I have to assume that the issue lies in the library; While I think this has probably something to do with the signing, while that can - at least to some extend - be detected a bit better, I doubt that Minestom has much say it this. I'll try to build unsigned artifacts, and edit this as needed, but in the meantime I'll close this issue unless I can verify that Minestom is at fault (which I doubt that it is now)

Edit Nr. 3: Since I cannot reproduce the issue with the default Classloader (or at least the Classloader used when I launch it via Eclipse) I have to verify that as a bug on Minestom's side, to be exact the used Classloader is the issue. Even when manually using Class.forName() the issue can be reproduced, even when the dependency is self compiled (not signed!) and when I threw out Gradle out in favour of Maven nothing really happened differently. I really got no idea to why as it would not find a class that's obviously there and to be honest I'm a bit tired of checking what it could be. I'll try to use a non-Minestom Classloader to load all the Classes, hopefully that works.

Edit Nr. 4: Tried the system classloader: Also didn't work. Fernflower doesn't want to decompile the jar either, so I have to assume that the classes are somehow corrupt, which would be backed by the fact that their last modification data was February 1st 1980.

Edit Nr. 5: Added the relocation hint

from minestom.

Geolykt avatar Geolykt commented on May 17, 2024

Verified to be a Minestom issue with a dual-boot bukkit/Minestom jar.

mavenerr-0.0.1-SNAPSHOT.zip
(ZIP file has to be renamed to .jar - did that due to limitations of Github's attachments)

from minestom.

Geolykt avatar Geolykt commented on May 17, 2024

Updated the issue to contain the most root cause without digging at Minestom's source, have fun with this!

from minestom.

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.