Win a copy of Java XML & JSON this week in the XML and Related Technologies forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Could not load minecraft plugin: NoClassDefFoundError  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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.
 
Saloon Keeper
Posts: 2134
80
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!