Plugin Cannot find main class

Discussion in 'Plugin Development' started by Bostrot, Apr 17, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Bostrot

    Hey Guys! I have a Error with my Plugin. Heres my Server.log:

    Code:
    [18:05:05] [Server thread/INFO]: Starting minecraft server version 1.7.8
    [18:05:05] [Server thread/INFO]: Loading properties
    [18:05:05] [Server thread/INFO]: Default game type: SURVIVAL
    [18:05:05] [Server thread/INFO]: Generating keypair
    [18:05:05] [Server thread/INFO]: Starting Minecraft server on *:25565
    [18:05:06] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks (MC: 1.7.8) (Implementing API version 1.7.8-R0.1-SNAPSHOT)
    [18:05:06] [Server thread/ERROR]: Could not load 'plugins\MultiPlugin.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: Cannot find main class `de.bhwb.xgamers.MultiPlugin'
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:42) ~[craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugins(CraftServer.java:357) [craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.<init>(CraftServer.java:319) [craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at net.minecraft.server.v1_7_R3.PlayerList.<init>(PlayerList.java:68) [craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at net.minecraft.server.v1_7_R3.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:126) [craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
    Caused by: java.lang.ClassNotFoundException: de.bhwb.xgamers.MultiPlugin
        at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
        at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_51]
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_51]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51]
        at java.lang.Class.forName0(Native Method) ~[?:1.7.0_51]
        at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_51]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[craftbukkit-1.7.8.jar:git-Bukkit-1.7.2-R0.3-26-gaed3233-b3052jnks]
        ... 10 more
    [18:05:06] [Server thread/INFO]: Preparing level "world"
    [18:05:06] [Server thread/INFO]: Preparing start region for level 0 (Seed: 8766946130735426951)
    [18:05:07] [Thread-7/INFO]: ----- Bukkit Auto Updater -----
    [18:05:07] [Thread-7/INFO]: It appears that you're running a Development Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
    [18:05:07] [Thread-7/INFO]: If you would like to be kept informed about new Development Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'dev'.
    [18:05:07] [Thread-7/INFO]: With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
    [18:05:07] [Thread-7/INFO]: If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
    [18:05:07] [Thread-7/INFO]: ----- ------------------- -----
    [18:05:07] [Server thread/INFO]: Preparing spawn area: 26%
    [18:05:08] [Server thread/INFO]: Preparing spawn area: 37%
    [18:05:09] [Server thread/INFO]: Preparing spawn area: 46%
    [18:05:10] [Server thread/INFO]: Preparing spawn area: 55%
    [18:05:11] [Server thread/INFO]: Preparing spawn area: 66%
    [18:05:12] [Server thread/INFO]: Preparing spawn area: 78%
    [18:05:13] [Server thread/INFO]: Preparing start region for level 1 (Seed: -2055781999118114877)
    [18:05:14] [Server thread/INFO]: Preparing spawn area: 45%
    [18:05:15] [Server thread/INFO]: Preparing spawn area: 79%
    [18:05:16] [Server thread/INFO]: Preparing start region for level 2 (Seed: -2055781999118114877)
    [18:05:16] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [18:05:16] [Server thread/INFO]: Done (10,390s)! For help, type "help" or "?"
     
  2. Offline

    caseif

    Well, the main class (MultiPlugin in package de.bhwb.xgamers) is missing. Make sure it's there and that you're referencing it in the plugin.yml correctly. Remember, Java is case-sensitive in most regards.
     
  3. Offline

    Bostrot

    I tried it but it doesn't help. This ist the plugin.yml and on the path de\bhwb\xgamers\multiplugin is the main class (main.java). What did I wrong?
    Code:
    name: MultiPlugin
    version: 1.0
    author: Eric
    main: de.bhwb.xgamers.multiplugin.main
    commands:
      notch:
        usage: /notch
        description: test
    EDIT:
    And the interesting thing is that if I unpack the jar file there is nor folder with de... I tried to add it manually but the same error in the console.
     
Thread Status:
Not open for further replies.

Share This Page