Posted July 22, 201510 yr I'm building a votifier that runs on forge to use on my own server, since I'm going pure forge and no cauldron. While testing in IDEA, the mod compiled and ran successfully, however, when I build it (with /gradlew build) and run it on a server, I get a ClassDefNotFoundException. My project structure is: src -main --java ---com.direnode.forgevotifier ----cryptography -----KeyGenerator -----RSA -----RSARead ----handler -----ConfigurationHandler -----PlayerHandler ----reference and some other stuff, follows that same order Latest forge log: http://pastebin.com/MB1Cwp0S Crash log: http://pastebin.com/Ua9zmXZu At first it also happened with the KeyGen class, but I generated them in the IDEA server and just transferred it.
July 22, 201510 yr Did you reference any of the client classes or use some @SideOnly? You should not do that on Dedicated Server. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
July 22, 201510 yr Author Don't have any @SideOnly tags, it's supposed to be server-only, so I just set acceptableRemoteVersions = "*" in the @Mod The KeyPair and RSARead classes are mostly just encrypting and decrypting stuff, using java.security
July 22, 201510 yr Then please post the code of the class. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
July 22, 201510 yr Author Main class (ForgeVotifier): http://pastebin.com/tK6qEZ6v RSARead: http://pastebin.com/7aFB8cCB KeyGenerator: http://pastebin.com/VhdLc1tL
July 22, 201510 yr Does it work if you install it in a dedicated server without all those other mods? If you browse through your built jar, can you find the RSARead class in expected path? -TGG
July 22, 201510 yr Author I think I found the problem. While searching the .jar to reply to Does it work if you install it in a dedicated server without all those other mods? If you browse through your built jar, can you find the RSARead class in expected path? -TGG I noticed that the cryptography package is called "Cryptography" instead of "cryptography" so when it looks for cryptography.KeyGen, or RSARead, it can't find it It's strange, since the package name is cryptography, and the package of the classes is set to com.direnode.forgevotifier.cryptography
July 22, 201510 yr Author Got it, worked now. Had to delete the classes folder in the build folder and re-build. Thanks to everyone for the support!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.