Skip to content

[Bug] java.lang.NoClassDefFoundError: net/skinsrestorer/api/SkinsRestorerAPI #240

Open

Description

@wling-art
[08:37:09] [Craft Scheduler Thread - 12 - MinecraftStats/WARN]: [MinecraftStats] Plugin MinecraftStats v3.2.1 generated an exception while executing task 1049
java.lang.NoClassDefFoundError: net/skinsrestorer/api/SkinsRestorerAPI
	at de.pdinklag.mcstats.bukkit.SkinsRestorerProfileProvider.<init>(SkinsRestorerProfileProvider.java:15) ~[[M][WEB统计]MinecraftStats.jar:?]
	at de.pdinklag.mcstats.bukkit.BukkitUpdater.getAuthenticProfileProvider(BukkitUpdater.java:47) ~[[M][WEB统计]MinecraftStats.jar:?]
	at de.pdinklag.mcstats.Updater.run(Updater.java:352) ~[[M][WEB统计]MinecraftStats.jar:?]
	at de.pdinklag.mcstats.bukkit.BukkitUpdater.run(BukkitUpdater.java:71) ~[[M][WEB统计]MinecraftStats.jar:?]
	at de.pdinklag.mcstats.bukkit.BukkitUpdateTask.run(BukkitUpdateTask.java:17) ~[[M][WEB统计]MinecraftStats.jar:?]
	at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.20.2.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.skinsrestorer.api.SkinsRestorerAPI
	at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:199) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:166) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
	... 11 more

Activity

  1. added
    FeedbackIssues that need feedback from the reporter.
    on Feb 2, 2024
  2. pdinklag commented on Feb 2, 2024

    @pdinklag
    Owner

    I'm gonna need more info here. I suppose you have Skins Restorer installed, but apparently a version without an API. Either an old one or something major has changed in a newer version.

    What version of Skins Restorer are you using?

  3. wling-art commented on Feb 2, 2024

    @wling-art
    Author

    I'm gonna need more info here. I suppose you have Skins Restorer installed, but apparently a version without an API. Either an old one or something major has changed in a newer version.

    What version of Skins Restorer are you using?

    latest: 15.0.6

    I think it's the new version of Skins Restorer API but the plugin isn't adapted, right?

  4. added
    BugNasty little bugs that need fixing.
    and removed
    FeedbackIssues that need feedback from the reporter.
    on Feb 2, 2024
  5. pdinklag commented on Feb 2, 2024

    @pdinklag
    Owner

    是一个没有 API 的版本。在较新的版本中,旧的或重大的更改。
    您使用的是哪个版本的

    latest: 15.0.6

    I think it's the new version of Skins Restorer API but the plugin isn't adapted, right?

    I didn't adapt anything.

    Apparently, according to their documentation, they changed the class name from SkinsRestorerAPI to just SkinsRestorer. I could not find out when they changed it. That is very unfortunate project management on their side, these kinds of changes break every and all plugins that use the API and make it unnecessarily complicated to support different versions...

    But thank you for noting, I will have to adapt MinecraftStats for it.

  6. Athar42 commented on Jun 18, 2024

    @Athar42

    I'm doing a little "bump" on this one, as it seems to not be published yet... so I still post my log output just in case, but seems the same as the original author :

    [23:14:14 WARN]: [MinecraftStats] Plugin MinecraftStats v3.3.0 generated an exception while executing task 64
    java.lang.NoClassDefFoundError: net/skinsrestorer/api/SkinsRestorerAPI
            at de.pdinklag.mcstats.bukkit.SkinsRestorerProfileProvider.<init>(SkinsRestorerProfileProvider.java:15) ~[MinecraftStats-3.3.0.jar:?]
            at de.pdinklag.mcstats.bukkit.BukkitUpdater.getAuthenticProfileProvider(BukkitUpdater.java:47) ~[MinecraftStats-3.3.0.jar:?]
            at de.pdinklag.mcstats.Updater.run(Updater.java:368) ~[MinecraftStats-3.3.0.jar:?]
            at de.pdinklag.mcstats.bukkit.BukkitUpdater.run(BukkitUpdater.java:71) ~[MinecraftStats-3.3.0.jar:?]
            at de.pdinklag.mcstats.bukkit.BukkitUpdateTask.run(BukkitUpdateTask.java:17) ~[MinecraftStats-3.3.0.jar:?]
            at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.4.jar:git-Paper-497]
            at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.4.jar:git-Paper-497]
            at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.4.jar:?]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
            at java.lang.Thread.run(Thread.java:1583) ~[?:?]
    Caused by: java.lang.ClassNotFoundException: net.skinsrestorer.api.SkinsRestorerAPI
            at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:197) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
            at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
            ... 11 more
    

    Using :

    • Paper 1.20.4 build 497 (latest from this branch)
    • MinecraftStats 3.3.0 (also latest so :) )
    • SkinRestorer 15.0.15
    [23:16:24 INFO]: [SkinsRestorer] ----------------------------------------------
    [23:16:24 INFO]: [SkinsRestorer]     +==================+
    [23:16:24 INFO]: [SkinsRestorer]     |   SkinsRestorer  |
    [23:16:24 INFO]: [SkinsRestorer]     |------------------|
    [23:16:24 INFO]: [SkinsRestorer]     |    Proxy Mode    |
    [23:16:24 INFO]: [SkinsRestorer]     +==================+
    [23:16:24 INFO]: [SkinsRestorer] ----------------------------------------------
    [23:16:24 INFO]: [SkinsRestorer]     Version: 15.0.15
    [23:16:24 INFO]: [SkinsRestorer]     Commit: fcfa8b9
    [23:16:24 INFO]: [SkinsRestorer]     This is the latest version!
    [23:16:24 INFO]: [SkinsRestorer] ----------------------------------------------
    

    Is there any estimation on when a new build including the fix will be out ? (sorry for the ping @pdinklag )

    Thanks :)

  7. Athar42 commented on Jun 19, 2024

    @Athar42

    From my testing so far, the error is still displayed, because the API isn't working when the server is in "Proxy Mode"

    Make sure SkinsRestorer is not in "Proxy Mode" if you are using BungeeCord/Velocity.

    So, there should be a check to wether enable or not the SkinsRestorer support depending on the functioning mode of it.

    Edit : But there might be another solution, on the backend server :

    Backend API:
    You can enable the backend storage by creating a file called enableSkinStorageAPI.txt in SkinsRestorer folder (backend server -> ./plugins/SkinsRestorer/enableSkinStorageAPI.txt)
    This is useful when using plugins like BedWars, Dynmap, etc. that need to get the skin through API from the backend server.
    Keep in mind that connecting MySQL to the same database as the proxy is required for this to work!
    
  8. pdinklag commented on Jul 1, 2024

    @pdinklag
    Owner

    Build 3.3.1 is now released.

    From my testing so far, the error is still displayed, because the API isn't working when the server is in "Proxy Mode"

    I have genuinely no idea what this means. What is "Proxy Mode"? In any event, if SkinsRestorer doesn't work in "Proxy Mode", then why not not use it in "Proxy Mode"? Why would I fix something in MinecraftStats for SkinsRestorer for a scenario in which SkinsRestorer is not even supposed to work?

  9. added
    FeedbackIssues that need feedback from the reporter.
    and removed
    BugNasty little bugs that need fixing.
    on Jul 1, 2024
  10. Athar42 commented on Jul 1, 2024

    @Athar42

    The "Proxy mode" is used, in general, when you use... a proxy :D (sorry^^, like Velocity).

    For example, this is from my Proxy (Velocity server) :
    image

    And on one of my backend server (lobby, creative, or any other, that's the same) :
    image

    And for "SR is not even supposed to work", well, it work in Proxy Mode (it's part of its job), but the API itself, in such mode, it's not :
    https://skinsrestorer.net/docs/development/api#getting-issues

    Make sure SkinsRestorer is not in "Proxy Mode" if you are using BungeeCord/Velocity.

    And just in case you wonder "Why" I'm in proxy mode, that's the intended setup for when you use a proxy :
    https://skinsrestorer.net/docs/installation/velocity

    So sadly, SR didn't made it easy for developpers, they have to check in which state this plugin is and, if in "Proxy Mode", disable this (or the users, like me, should enable the "Backend API", but the player skin is not retrieved this way, don't know why. At least, the error just vanish)

  11. pdinklag commented on Jul 31, 2024

    @pdinklag
    Owner

    From my testing so far, the error is still displayed, because the API isn't working when the server is in "Proxy Mode"

    To get back to this, are you sure it's exactly the same error? Because the error was that the class was not found, and that's because they renamed it. I updated MinecraftStats to use the new class name, so if there's still an error message, it should really be a different one? Can you post it?

    The "Proxy mode" is used, in general, when you use... a proxy :D (sorry^^, like Velocity).

    But if a server is a proxy, doesn't it mean it just forwards connections to another server or somehow shares data with another server? I don't really understand why you would set up a statistics framework for a proxy - do you set up MinecraftStats for every proxy?

    Could you try aggregating stats from multiple servers instead?

  12. Athar42 commented on Jul 31, 2024

    @Athar42

    I did some "paint skill" :D maybe that'll help in understanding my setup :
    image

    So, the users connect to the proxy and get redirected to the lobby, then they connect to any "GAME" server they want to access.
    Once they are in a "GAME" server, they aren't connected to the lobby anymore, only through the proxy.

    MinecraftStats isn't installed on all of the "GAME" server, just a couple of those.
    And "SkinRestorer" is, indeed, installed on ALL the servers, proxy included.

    So, for SkinRestorer, it's working on my proxy as "a main thread", and all sub-server (Lobby and GAME x) are connected in proxy mode (as you can see in my previous post).
    In that case, all "sub servers" connect to the proxy to get SkinRestorer datas.

    For that specific scenario, you have to enable SR to use an SQL database so that all servers are in sync for the datas.

    Anyways, that's not of a big deal, as the only "breaking" stuff I saw is not getting the proper skin of the player (that's sad, but we can live without it 😊)

    As you open the change #255 , just get rid of it, that's fine I think.

    Your plugin will still rocks without it 😋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeedbackIssues that need feedback from the reporter.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions