Unsupported major.minor version 52.0

Discussion in 'Spigot Plugin Development' started by JoelStoner, Jun 15, 2016.

  1. So i have 4 Plugins, all built on the same machine, using Java 1.7, i also do Forge Mods on this machine. I was asked to update my plugins for MC 1.10. So i did, and only 2 of my Plugins needed changes, due to import names.

    I have a user with a server running Java 1.8, that can run 2 of my Plugins but not 1 of the other 2. I've updated my server.jar to where it says i have the most recent, and still the 1 won't load, due to "14.06 12:13:26 [Server] INFO org.bukkit.plugin.
    InvalidPluginException: java.lang.UnsupportedClassVersionError: com/github/joelgodofwar/sps/PluginBase : Unsupported major.minor version 52.0"

    The 2 plugins that have no issues are DragonDropElytra 2.13.2, and NoEndermanGrief 1.0.1.
    The 1 that will not load is SinglePlayerSleep 2.13.13.

    I have tested all 3 of these on my machine, with the most recent 1.10 spigot and craftbukkit server jars with no issues.

    14.06 12:13:16 [Multicraft] Loading server properties
    14.06 12:13:16 [Multicraft] Starting server!
    14.06 12:13:16 [Multicraft] Loaded config for "Default Minecraft Server"
    14.06 12:13:16 [Server] INFO Warning, your max perm gen size is not set or less than 128mb. It is recommended you restart Java with the following argument: -XX:MaxPermSize=128M
    14.06 12:13:16 [Server] INFO Please see http://www.spigotmc.org/wiki/changing-permgen-size/ for more details and more in-depth instructions.
    14.06 12:13:16 [Server] INFO Loading libraries, please wait...
    14.06 12:13:25 [Server] INFO Starting minecraft server version 1.10
    14.06 12:13:25 [Server] INFO Loading properties
    14.06 12:13:25 [Server] INFO Default game type: SURVIVAL
    14.06 12:13:25 [Server] INFO This server is running CraftBukkit version git-Spigot-3ccadba-fb568fd (MC: 1.10) (Implementing API version 1.10-R0.1-SNAPSHOT)
    14.06 12:13:25 [Server] INFO Using 4 threads for Netty based IO
    14.06 12:13:25 [Server] INFO Server Ping Player Sample Count: 12
    14.06 12:13:25 [Server] INFO Debug logging is disabled
    14.06 12:13:25 [Server] INFO Generating keypair
    14.06 12:13:25 [Server] INFO Starting Minecraft server on 100.255.1.1:25562
    14.06 12:13:26 [Server] INFO Using epoll channel type
    14.06 12:13:26 [Server] INFO Set PluginClassLoader as parallel capable
    14.06 12:13:26 [Server] ERROR Could not load 'plugins/SinglePlayerSleep.
    jar' in folder 'plugins'
    14.06 12:13:26 [Server] INFO org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/github/joelgodofwar/sps/PluginBase : Unsupported major.minor version 52.0
    14.06 12:13:26 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO at org.bukkit.craftbukkit.v1_10_R1.CraftServer.loadPlugins(CraftServer.java:297) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO at net.minecraft.server.v1_10_R1.DedicatedServer.init(DedicatedServer.java:202) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:539) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79]
    14.06 12:13:26 [Server] INFO Caused by: java.lang.UnsupportedClassVersionError: com/github/joelgodofwar/sps/PluginBase : Unsupported major.minor version 52.0
    14.06 12:13:26 [Server] INFO at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.lang.Class.forName0(Native Method) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at java.lang.Class.forName(Class.java:274) ~[?:1.7.0_79]
    14.06 12:13:26 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:64) ~[spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.10.jar:git-Spigot-3ccadba-fb568fd]
    14.06 12:13:26 [Server] INFO ... 6 more
    14.06 12:13:26 [Server] INFO [NoEndermanGrief] Loading NoEndermanGrief v1.0.1
    14.06 12:13:28 [Multicraft] Skipped 89 lines due to rate limit (30/s)
    14.06 12:13:28 [Server] INFO Preparing spawn area: 8%
    14.06 12:13:29 [Server] INFO Preparing spawn area: 82%
    14.06 12:13:29 [Server] INFO Preparing start region for level 1 (Seed: -5068105647928649762)
    14.06 12:13:30 [Server] INFO Preparing spawn area: 65%
    14.06 12:13:30 [Server] INFO Preparing start region for level 2 (Seed: -5068105647928649762)
    14.06 12:13:30 [Server] INFO [NoEndermanGrief] Enabling NoEndermanGrief v1.0.1
    14.06 12:13:30 [Server] INFO [NoEndermanGrief] plugins/NoEndermanGrief/config.yml
    14.06 12:13:30 [Server] INFO **************************************************************
    14.06 12:13:30 [Server] INFO NoEndermanGrief version 1.0.1 Has been enabled
    14.06 12:13:30 [Server] INFO **************************************************************
    14.06 12:13:30 [Server] INFO [DragonDropElytra] Enabling DragonDropElytra v2.13.2
    14.06 12:13:30 [Server] INFO [DragonDropElytra] plugins/DragonDropElytra/config.yml
    14.06 12:13:30 [Server] INFO **************************************************************
    14.06 12:13:30 [Server] INFO DragonDropElytra version 2.13.2 Has been enabled
    14.06 12:13:30 [Server] INFO **************************************************************
    14.06 12:13:30 [Server] INFO [DeathMessagesPrime] Enabling DeathMessagesPrime v1.8
    14.06 12:13:31 [Server] INFO [DeathMessagesPrime] Minecraft version is 1.10
    14.06 12:13:31 [Server] INFO [dynmap] Enabling dynmap v2.3-1142
    14.06 12:13:33 [Server] INFO [dynmap] Added 1 custom biome mappings
    14.06 12:13:33 [Server] INFO [dynmap] Using Bukkit Permissions (superperms) for access control
    14.06 12:13:33 [Server] INFO [dynmap] Web interface permissions only available for online users
    14.06 12:13:33 [Server] INFO [dynmap] Mod Support processing completed
    14.06 12:13:34 [Server] INFO [dynmap] Loaded 23 shaders.
    14.06 12:13:34 [Server] INFO [dynmap] Loaded 82 perspectives.
    14.06 12:13:34 [Server] INFO [dynmap] Loaded 14 lightings.
    14.06 12:13:35 [Server] INFO [dynmap] Web server started on address 100.255.1.1:8123
    14.06 12:13:35 [Server] INFO [dynmap] version 2.3-1142 is enabled - core version 2.3-2074
    14.06 12:13:35 [Server] INFO [dynmap] Loaded 3 maps of world 'world'.
    14.06 12:13:35 [Server] INFO [dynmap] Loaded 7 pending tile renders for world 'world'
    14.06 12:13:35 [Server] INFO [dynmap] Loaded 2 maps of world 'world_nether'.
    14.06 12:13:35 [Server] INFO [dynmap] Loaded 2 maps of world 'world_the_end'.
    14.06 12:13:35 [Server] INFO [dynmap] Enabled
    14.06 12:13:35 [Server] INFO Server permissions file permissions.yml is empty, ignoring it
    14.06 12:13:35 [Server] Startup Done (8.790s)! For help, type "help" or "?"
    14.06 12:13:36 [Server] INFO [dynmap] Loading default resource pack
    14.06 12:13:46 [Server] INFO UUID of player StarBound6494 is 8a6e4026-302b-458f-8635-c6caa221b5b2
    14.06 12:13:47 [Connect] User StarBound6494, IP 68.50.7.162
    14.06 12:13:47 [Multicraft] StarBound6494 ran command Message of the Day
    14.06 12:14:41 [Server] INFO This server is running CraftBukkit version git-Spigot-3ccadba-fb568fd (MC: 1.10) (Implementing API version 1.10-R0.1-SNAPSHOT)
    14.06 12:14:41 [Server] INFO Checking version, please wait...
    14.06 12:14:42 [Server] INFO You are running the latest version

    [23:51:40] [Server thread/INFO]: Starting minecraft server version 1.10
    [23:51:40] [Server thread/INFO]: Loading properties
    [23:51:40] [Server thread/INFO]: Default game type: SURVIVAL
    [23:51:41] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-3ccadba-fb568fd (MC: 1.10) (Implementing API version 1.10-R0.1-SNAPSHOT)
    [23:51:41] [Server thread/INFO]: Debug logging is disabled
    [23:51:41] [Server thread/INFO]: Server Ping Player Sample Count: 12
    [23:51:41] [Server thread/INFO]: Using 4 threads for Netty based IO
    [23:51:41] [Server thread/INFO]: Generating keypair
    [23:51:41] [Server thread/INFO]: Starting Minecraft server on *:25565
    [23:51:41] [Server thread/INFO]: Using default channel type
    [23:51:41] [Server thread/INFO]: Set PluginClassLoader as parallel capable
    [23:51:41] [Server thread/INFO]: [DragonDropElytra] Loading DragonDropElytra v2.13.2
    [23:51:41] [Server thread/INFO]: [SinglePlayerSleep] Loading SinglePlayerSleep v2.13.13
    [23:51:41] [Server thread/INFO]: [NoEndermanGrief] Loading NoEndermanGrief v1.0.2
    [23:51:41] [Server thread/INFO]: **** Beginning UUID conversion, this may take A LONG time ****
    [23:51:41] [Server thread/INFO]: Preparing level "world"
    [23:51:41] [Server thread/INFO]: -------- World Settings For [world] --------
    [23:51:41] [Server thread/INFO]: Max Entity Collisions: 8
    [23:51:41] [Server thread/INFO]: Custom Map Seeds: Village: 10387312 Feature: 14357617
    [23:51:41] [Server thread/INFO]: Item Despawn Rate: 6000
    [23:51:41] [Server thread/INFO]: Item Merge Radius: 2.5
    [23:51:41] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [23:51:41] [Server thread/INFO]: Experience Merge Radius: 3.0
    [23:51:41] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [23:51:41] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [23:51:41] [Server thread/INFO]: Structure Info Saving: true
    [23:51:41] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Cane Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Melon Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: NetherWart Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Random Lighting Updates: false
    [23:51:41] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [23:51:41] [Server thread/INFO]: Mob Spawn Range: 4
    [23:51:41] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [23:51:41] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [23:51:41] [Server thread/INFO]: Max TNT Explosions: 100
    [23:51:41] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
    [23:51:41] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [23:51:41] [Server thread/INFO]: View Distance: 10
    [23:51:41] [Server thread/INFO]: -------- World Settings For [world_nether] --------
    [23:51:41] [Server thread/INFO]: Max Entity Collisions: 8
    [23:51:41] [Server thread/INFO]: Custom Map Seeds: Village: 10387312 Feature: 14357617
    [23:51:41] [Server thread/INFO]: Item Despawn Rate: 6000
    [23:51:41] [Server thread/INFO]: Item Merge Radius: 2.5
    [23:51:41] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [23:51:41] [Server thread/INFO]: Experience Merge Radius: 3.0
    [23:51:41] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [23:51:41] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [23:51:41] [Server thread/INFO]: Structure Info Saving: true
    [23:51:41] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Cane Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Melon Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: NetherWart Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Random Lighting Updates: false
    [23:51:41] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [23:51:41] [Server thread/INFO]: Mob Spawn Range: 4
    [23:51:41] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [23:51:41] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [23:51:41] [Server thread/INFO]: Max TNT Explosions: 100
    [23:51:41] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
    [23:51:41] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [23:51:41] [Server thread/INFO]: View Distance: 10
    [23:51:41] [Server thread/INFO]: -------- World Settings For [world_the_end] --------
    [23:51:41] [Server thread/INFO]: Max Entity Collisions: 8
    [23:51:41] [Server thread/INFO]: Custom Map Seeds: Village: 10387312 Feature: 14357617
    [23:51:41] [Server thread/INFO]: Item Despawn Rate: 6000
    [23:51:41] [Server thread/INFO]: Item Merge Radius: 2.5
    [23:51:41] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [23:51:41] [Server thread/INFO]: Experience Merge Radius: 3.0
    [23:51:41] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [23:51:41] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [23:51:41] [Server thread/INFO]: Structure Info Saving: true
    [23:51:41] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Cane Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Melon Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: NetherWart Growth Modifier: 100%
    [23:51:41] [Server thread/INFO]: Random Lighting Updates: false
    [23:51:41] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [23:51:41] [Server thread/INFO]: Mob Spawn Range: 4
    [23:51:41] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [23:51:41] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [23:51:41] [Server thread/INFO]: Max TNT Explosions: 100
    [23:51:41] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
    [23:51:41] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [23:51:41] [Server thread/INFO]: View Distance: 10
    [23:51:41] [Server thread/INFO]: Preparing start region for level 0 (Seed: -7870782489180049704)
    [23:51:42] [Server thread/INFO]: Preparing spawn area: 18%
    [23:51:43] [Server thread/INFO]: Preparing start region for level 1 (Seed: -7870782489180049704)
    [23:51:44] [Server thread/INFO]: Preparing start region for level 2 (Seed: -7870782489180049704)
    [23:51:45] [Server thread/INFO]: [DragonDropElytra] Enabling DragonDropElytra v2.13.2
    [23:51:45] [Server thread/INFO]: [DragonDropElytra] plugins\DragonDropElytra\config.yml
    [23:51:45] [Server thread/INFO]: **************************************************************
    [23:51:45] [Server thread/INFO]: DragonDropElytra version 2.13.2 Has been enabled
    [23:51:45] [Server thread/INFO]: **************************************************************
    [23:51:45] [Server thread/INFO]: [SinglePlayerSleep] Enabling SinglePlayerSleep v2.13.13
    [23:51:45] [Server thread/INFO]: [SinglePlayerSleep] plugins\SinglePlayerSleep\config.yml
    [23:51:45] [Server thread/INFO]: **************************************************************
    [23:51:45] [Server thread/INFO]: SinglePlayerSleep version 2.13.13 Has been enabled
    [23:51:45] [Server thread/INFO]: **************************************************************
    [23:51:45] [Server thread/INFO]: SinglePlayerSleep SinglePlayerSleep debug=false in plugins\SinglePlayerSleep/config.yml
    [23:51:45] [Server thread/INFO]: [NoEndermanGrief] Enabling NoEndermanGrief v1.0.2
    [23:51:45] [Server thread/INFO]: [NoEndermanGrief] plugins\NoEndermanGrief\config.yml
    [23:51:45] [Server thread/INFO]: **************************************************************
    [23:51:45] [Server thread/INFO]: NoEndermanGrief version 1.0.2 Has been enabled
    [23:51:45] [Server thread/INFO]: **************************************************************
    [23:51:45] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [23:51:45] [Server thread/INFO]: Done (3.617s)! For help, type "help" or "?"
    [23:53:15] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-3ccadba-fb568fd (MC: 1.10) (Implementing API version 1.10-R0.1-SNAPSHOT)[m
    [23:53:15] [Server thread/INFO]: Checking version, please wait...[m
    [23:53:16] [Thread-8/INFO]: You are running the latest version[m
     
  2. Java Major.Minor version 52.0 is Java 8. The error you see means the plugin was compiled using Java 8 and the server running them is using something lower. Theres no other reason for that error. Tell the user to upgrade to Java 8 and the error will go away. Java 7 is EOL for more than a year now and is no longer receiving security updates.
     
    • Like Like x 1
  3. Yeah. If you want to run these plugins, you need to recompile them under Java 7 (deprecated), or to update your Java version (recommended).
     
  4. I don't get how 2 of the plugins compiled with the same java version would work, but 1 wouldn't?
     
  5. MiniDigger

    Supporter

    You can change the target version in your compiler.
     
  6. Because regardless of your attempts, the server is still running Java 7. The two plugins which work are compiled for Java 7, and the one that doesn't work for Java 8. That's all there is to conclude from the error message.

    That's not the proper solution though :p (downgrading, that is)
     
  7. MiniDigger

    Supporter

    I know. I was explaining why some plugins compiled on Java 8 work on Java 7.
     
  8. Compile the plugin in Java 7.
     
    • Like Like x 1
  9.