• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Could not load minecraft plugin: NoClassDefFoundError

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all I'm beginner and I'm not the author of the program I'm working on (also I don't speak well english). So I may will not be enough specific, tell me if you need more informations.

This plugin was running in the 1.12 version of minecraft properly. My goal is to update it for the 1.13 version. I've already fix all issues Gradle showed. Now I want to test but here I'm stuck.

I'm getting this error when I try to load the plugin:

[18:31:21] [Server thread/ERROR]: Could not load 'plugins/mainplugin-3.3.15-SNAPSHOT.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/hibernate/service/ServiceRegistry
   at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.craftbukkit.v1_13_R2.CraftServer.loadPlugins(CraftServer.java:326) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.craftbukkit.v1_13_R2.CraftServer.reload(CraftServer.java:851) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.Bukkit.reload(Bukkit.java:603) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:55) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:729) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchServerCommand(CraftServer.java:691) ~[patched_1.13.2.jar:git-Paper-405]
   at net.minecraft.server.v1_13_R2.DedicatedServer.aU(DedicatedServer.java:483) ~[patched_1.13.2.jar:git-Paper-405]
   at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:440) ~[patched_1.13.2.jar:git-Paper-405]
   at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:943) ~[patched_1.13.2.jar:git-Paper-405]
   at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:841) ~[patched_1.13.2.jar:git-Paper-405]
   at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/ServiceRegistry
   at java.lang.Class.forName0(Native Method) ~[?:1.8.0_131]
   at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_131]
   at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:82) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[patched_1.13.2.jar:git-Paper-405]
   ... 14 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.service.ServiceRegistry
   at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_131]
   at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:158) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:104) ~[patched_1.13.2.jar:git-Paper-405]
   at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_131]
   at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_131]
   at java.lang.Class.forName0(Native Method) ~[?:1.8.0_131]
   at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_131]
   at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:82) ~[patched_1.13.2.jar:git-Paper-405]
   at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[patched_1.13.2.jar:git-Paper-405]
   ... 14 more

Dependencies are managed by Gradle using Artifactory. This plugin use a database and ORM. The minecraft server is running on a Debian server. The used API for the minecraft server is paperspigot. My IDE is Eclipse.
 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Steve Boulanger wrote:...Caused by: java.lang.ClassNotFoundException: org.hibernate.service.ServiceRegistry
...

Welcome to Coderanch ! We hope you have a great time here.
A Class Not found exception is usually thrown when then JVM is unable to find the class it needs to load to run your program. This is usually when you do not add the right jars or even if they are present, they're not included in the runtime classpath.
The class you mentioned is probably from hibernate-core can you include that in your build and verify if you're still getting the same exception ?
 
Steve Boulanger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, thanks for the answer
I know what mean this exception I just can't find were it from.
Yes the class mentioned come is from hibernate-core and is already included in the build.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic