0

I'm trying to revive a plugin and im geting thir error:

[03:01:18 ERROR]: Could not load 'plugins\Reporter.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: me.f
levasgr.rainbow.Reporter
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:184) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
java:308) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
.java:231) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.ja
va:255) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.<init>(CraftServer.java:23
3) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.PlayerList.<init>(PlayerList.java:63) [c
raftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14
) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.jav
a:126) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
:424) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
Caused by: java.lang.ClassNotFoundException: me.flevasgr.rainbow.Reporter
        at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_25]
        at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_25]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_
25]
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_25]
        at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader
.java:80) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:53) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_25]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_25]
        at java.lang.Class.forName0(Native Method) ~[?:1.7.0_25]
        at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_25]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:173) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        ... 9 more

I've done everything right! The plugin.yml the external jar and the export but still doesnt work. Any idea why?

2 Answers 2

1

As the error states,

java.lang.ClassNotFoundException: me.f levasgr.rainbow.Reporter

it cannot find the main class of your plugin. Perhaps one of your package names is capitalized, or your main class is lowercase. Bukkit's plugin loader is case sensitive when it comes to loading the main class.

Sign up to request clarification or add additional context in comments.

3 Comments

i.imgur.com/ckJOJCE.png I think the names was okay. I changed the main to me.flevasgr.Reporter and still nothing
In that case, it should be me.flevasgr.rainbow.Reporter.Reporter. Bukkit couldn't find the class as you were only specifying the package, Bukkit requires the package along with the class.
I meant in plugin.yml, main should equal me.flevasgr.rainbow.Reporter.Reporter, my fault for not specifying that
0

There are different reasons for a java.lang.ClassNotFoundException in bukkit, the most common reason is that the plugin.yml doesn't point to the correct location.

If you have the following class:

package me.flevasgr.rainbow.reporter;
//...
public class Reporter {

Then you should copy the full package, place a dot and then place the name of the class, like this:

main: me.flevasgr.rainbow.reporter.Reporter 

This makes sure bukkit will find your class on the correct location.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.