Paper: UHCReloaded malformed class name Error

Created on 5 Jun 2017  路  1Comment  路  Source: PaperMC/Paper

List of Plugins.

  • BuycraftX
  • EsentialsX
  • FastAsyncWorldEdit
  • MinkFreeze
  • MysqlEcoBridge
  • OpenInv
  • PAC
  • PlugMan
  • ProtocolLib
  • UHCReloaded
  • Vault
  • Worldedit
[19:14:37 ERROR]: Error occurred while enabling UHCReloaded v3.2.4 (Is it up to date?)
java.lang.InternalError: Malformed class name
        at java.lang.Class.getSimpleName(Unknown Source) ~[?:1.8.0_131]
        at java.lang.Class.isAnonymousClass(Unknown Source) ~[?:1.8.0_131]
        at co.aikar.timings.MinecraftTimings.getPluginTaskTimings(MinecraftTimings.java:62) ~[patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.<init>(CraftTask.java:41) ~[patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:139) ~[patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.runTaskLater(CraftScheduler.java:113) ~[patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.scheduler.BukkitRunnable.runTaskLater(BukkitRunnable.java:64) ~[patched_1.11.2.jar:git-Paper-1104]
        at net.upd4ting.uhcreloaded.uhcrg.onEnable(UHCReloaded.java:120) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:271) ~[patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) [patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugin(CraftServer.java:378) [patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugins(CraftServer.java:328) [patched_1.11.2.jar:git-Paper-1104]
        at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:209) [patched_1.11.2.jar:git-Paper-1104]
        at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:612) [patched_1.11.2.jar:git-Paper-1104]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
[19:14:37 INFO]: [UHCReloaded] Disabling UHCReloaded v3.2.4
[19:14:37 ERROR]: Error occurred while disabling UHCReloaded v3.2.4 (Is it up to date?)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.8.0_131]
        at java.util.ArrayList.get(Unknown Source) ~[?:1.8.0_131]
        at net.upd4ting.uhcreloaded.uhcraa.uhcrM(Game.java:553) ~[?:?]
        at net.upd4ting.uhcreloaded.uhcraa.uhcrg(Game.java:76) ~[?:?]
        at net.upd4ting.uhcreloaded.uhcrg.onDisable(UHCReloaded.java:205) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:273) ~[patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:344) [patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:320) [patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugin(CraftServer.java:378) [patched_1.11.2.jar:git-Paper-1104]
        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugins(CraftServer.java:328) [patched_1.11.2.jar:git-Paper-1104]
        at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:209) [patched_1.11.2.jar:git-Paper-1104]
        at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:612) [patched_1.11.2.jar:git-Paper-1104]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
plugin 1.11

Most helpful comment

This is not paper's fault, but the author's.

  1. The class used is not following the JLS (Java Language Specification) for class names (hence the malformed class name message).
  2. _This does not happen under normal circumstances, i.e through the Java Compiler._
  3. This most likely happened through creating classes at runtime.

The proper naming for a class is as follows:

  • Can only contain the '$', '_', a-z, A-Z characters (all Latin-1)
  • Starts with a letter
  • Not empty

The above are for top level classes. These are the rules that apply to anonymous classes and local classes:

  • "The binary name of a local class (搂14.3) consists of the binary name of its immediately enclosing type, followed by $, followed by a non-empty sequence of digits, followed by the simple name of the local class." (Java Language Specification Section 13.1)
  • "The binary name of an anonymous class (搂15.9.5) consists of the binary name of its immediately enclosing type, followed by $, followed by a non-empty sequence of digits." (Java Language Specification Section 13.1)

Sources:
https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-Identifier
https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.1
https://docs.oracle.com/javase/specs/jls/se8/html/jls-13.html#jls-13.1

>All comments

This is not paper's fault, but the author's.

  1. The class used is not following the JLS (Java Language Specification) for class names (hence the malformed class name message).
  2. _This does not happen under normal circumstances, i.e through the Java Compiler._
  3. This most likely happened through creating classes at runtime.

The proper naming for a class is as follows:

  • Can only contain the '$', '_', a-z, A-Z characters (all Latin-1)
  • Starts with a letter
  • Not empty

The above are for top level classes. These are the rules that apply to anonymous classes and local classes:

  • "The binary name of a local class (搂14.3) consists of the binary name of its immediately enclosing type, followed by $, followed by a non-empty sequence of digits, followed by the simple name of the local class." (Java Language Specification Section 13.1)
  • "The binary name of an anonymous class (搂15.9.5) consists of the binary name of its immediately enclosing type, followed by $, followed by a non-empty sequence of digits." (Java Language Specification Section 13.1)

Sources:
https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-Identifier
https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.1
https://docs.oracle.com/javase/specs/jls/se8/html/jls-13.html#jls-13.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Decme picture Decme  路  3Comments

Marlej-dev picture Marlej-dev  路  3Comments

tazuuuu picture tazuuuu  路  3Comments

mibby picture mibby  路  3Comments

ghost picture ghost  路  3Comments