Solved JavaPlugin requires org.bukkit.plugin.java.PluginClassLoader

Discussion in 'Plugin Development' started by readerboy434, Aug 12, 2014.

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

    readerboy434

    Hello everyone!

    I just tried making a test plugin a few minutes ago, and all worked well! However, when I got to testing my plugin, the server starts properly but my plugin is throwing errors. Full error: http://pastebin.com/AU2d8hp3

    I am using Eclipse, if that knowledge is needed.

    Thank you in advance for any help you could give me!
    -Reader
     
  2. Offline

    diamondcodes

    Can you post your Code?
     
  3. Offline

    readerboy434

  4. Offline

    unon1100

    "at org.readerboy434.TestPlugin.Main.<init>(Main.java:5)"

    Why do you have an initializer in your main class?

    Edit: Nevermind. Checking more.
     
  5. Offline

    _LB

    Paste plugin.yml?
     
  6. Offline

    readerboy434

    _LB
    unon1100
    Code:
    name: TestPlugin
    main: org.readerboy434.TestPlugin.Main
    version: 1.0
    Again, just a test plugin, so very minimalistic.
     
  7. Offline

    _LB

    Is the server running a different Java version than your plugin is compiled for? Try uninstalling all versions of Java from your computer and reinstall the one you want.
     
  8. Offline

    unon1100

    Try updating your version of bukkit again. EDIT: oh and that too ^^
     
  9. Offline

    readerboy434

    _LB

    I'd like to be able to run Java 7 and compile for Bukkit in Java 6, so rather than uninstalling Java I changed my run configuration. The error still occurs.

    I also found another error that I didn't notice before:
    WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
     
  10. Offline

    unon1100

    Try uploading your entire log file to pastebin
     
  11. Offline

    MCMatters

  12. Offline

    readerboy434

    unon1100

    Updating Bukkit doesn't fix anything.

    MCMatters

    I'm running inside Eclipse, and as such have no run.bat file.

    unon1100
    Full console report: http://pastebin.com/LzDcwYm2

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  13. Offline

    MCMatters

  14. Offline

    readerboy434

    MCMatters
    I'm running the server through Eclipse; I have my run configuration / build path / etc. set up so that when I press either the run or debug button, the server starts in Eclipse's console.
     
  15. Offline

    unon1100

    Ehmmm... bad idea. Try running through a batch file.
     
  16. Offline

    readerboy434

    unon1100
    Weird, didn't know running in Eclipse would cause plugins to not work.... It works when running via a command prompt.

    Thank you all for your help, I don't think I'd have figured out the error without it!

    Reader
     
  17. Offline

    Wolvereness Bukkit Team Member

    Eclipse 'breaks' the classloader hierarchy for plugins. Although forcing plugins to be loaded from the jar instead of the runtime breaks default debugging, it solves even stranger issues concerning the classpath and facilitates some new features.
     
Thread Status:
Not open for further replies.

Share This Page