Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved ClassNotFoundException

Comments in 'Plugin Development' started by h2oskier, Aug 15, 2015.

  1. h2oskier
    Offline

    h2oskier New Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    21
    Plugins:
    2
    Hi all,

    I'm experiencing ClassNotFoundException that is only reproducible on ONE of my PocketMine servers with my plugin. It is not occurring on my other servers for the same use-cases. There are a few differences with the plugins installed so I'm looking building another server equal to the one with the issue to isolate further. However, I'm hoping the forum might have seen a similar issue and offer their wisdom. If this is an issue correctable in my plugin, I want to make the correction to prevent issues in other environments.

    It would appear there may a path issue as it is looking for the Server in my plugin (see below). My plugin is namespaced. I'm don't specifically include pocketmine/Server in the plugin. Could it be that simple? And why would this issue only occur on 1 of my environments?

    Thanks in advance... Here are the errors:

    Error 1:
    2015-08-14 [18:32:52] [Server thread/CRITICAL]: "Could not pass event 'SimpleAuth\event\PlayerAuthenticateEvent' to 'BuddyNotify v1.1': Class BuddyNotify\Server not found on BuddyNotify\EventListener

    2015-08-14 [18:32:52] [Server thread/CRITICAL]: ClassNotFoundException: "Class BuddyNotify\Server not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144


    Error 2:
    [18:42:59] [Server thread/CRITICAL]: Could not execute task BuddyNotify\EventTask: Class BuddyNotify\Server not found

    [18:42:59] [Server thread/CRITICAL]: ClassNotFoundException: "Class BuddyNotify\Server not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144
    Last edited: Aug 15, 2015
  2. jojoe77777
    Offline

    jojoe77777 Notable Member Plugin Developer

    Joined:
    May 28, 2015
    Posts:
    653
    Plugins:
    1
    Minecraft User:
    jojoe77777
    Can I see the code?
  3. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Just include pocketmine\Server...
    h2oskier and jojoe77777 like this.
  4. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Obviously you forgot to import pocketmine\Server.
    amiremad and h2oskier like this.
  5. h2oskier
    Offline

    h2oskier New Member Plugin Developer

    Joined:
    Jun 10, 2015
    Posts:
    21
    Plugins:
    2
    Thank you all for the quick replies! Very helpful.

    I've built a server identical to the one having issue and reproduced the error.

    I've made a new plugin importing pocketmine/Server and on both servers the issue has been corrected.

    Apparently, my failure to import the resource was being masked by the difference in plugs available and the load order.

    Much appreciate...you all rock!
  6. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Me did that too.
  7. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    It's import, not include. ;)
  8. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Danm auto correct...
  9. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    You calling me an auto-corrector? o_O
  10. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    No... lol I mean my ipads auto correct...
  11. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    :eek:

Share This Page

Advertisement