VoxelSniper

VoxelSniper

1M Downloads

UnsupportedClassVersionError exception on startup

Nzill opened this issue ยท 31 comments

commented

For some reason my server won't load Voxelsniper at all. I hope someone can help me as to what is going wrong.

Loading libraries, please wait...
[17:05:57 INFO]: Starting minecraft server version 1.7.2
[17:05:57 INFO]: Loading properties
[17:05:57 INFO]: Default game type: SURVIVAL
[17:05:57 INFO]: Generating keypair
[17:05:57 INFO]: Starting Minecraft server on *:25565
[17:05:57 INFO]: This server is running CraftBukkit version git-Bukkit-1.7.2-R0.
2-b2974jnks (MC: 1.7.2) (Implementing API version 1.7.2-R0.2)
[17:05:57 ERROR]: Could not load 'plugins\VoxelSniper-5.168.9-SNAPSHOT.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/thevoxelbox/voxelpacket/common/interfaces/IVoxelMessageSubscriber : Unsupported major.minor version 51.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184) ~[craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:308) ~[craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:231) [craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.java:255) [craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.<init>(CraftServer.java:233) [craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.PlayerList.<init>(PlayerList.java:63) [craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.java:126) [craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:424) [craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
Caused by: java.lang.UnsupportedClassVersionError: com/thevoxelbox/voxelpacket/common/interfaces/IVoxelMessageSubscriber : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.6.0_31]
        at java.lang.ClassLoader.defineClassCond(Unknown Source) ~[?:1.6.0_31]
        at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.6.0_31]
        at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.6.0_31]
        at java.net.URLClassLoader.defineClass(Unknown Source) ~[?:1.6.0_31]
        at java.net.URLClassLoader.access$000(Unknown Source) ~[?:1.6.0_31]
        at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.6.0_31]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.6.0_31]
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.6.0_31]
        at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80) ~[craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) ~[craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.6.0_31]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.6.0_31]
        at java.lang.Class.forName0(Native Method) ~[?:1.6.0_31]
        at java.lang.Class.forName(Unknown Source) ~[?:1.6.0_31]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173) ~[craftbukkit-1.7.2-R0.2.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
        ... 9 more
[17:05:57 INFO]: Preparing level "world"
[17:05:57 INFO]: Preparing start region for level 0 (Seed: 5909455515125930461)
[17:05:58 INFO]: Preparing start region for level 1 (Seed: 5909455515125930461)
[17:05:58 INFO]: Preparing start region for level 2 (Seed: 5909455515125930461)
[17:05:58 INFO]: Server permissions file permissions.yml is empty, ignoring it
[17:05:58 INFO]: Done (1,257s)! For help, type "help" or "?"
>

EDIT: Edited to clean up error message (@MikeMatrix)
EDIT: Changed issue topic to a more descriptive name (@Monofraps)

commented

I was able to get this working today. I'm running OSX 10.9.1 and was fully up-to-date on Java. I had to downgrade Java JDK to Java 7 Update 45. That seemed to fix the issue for now.

commented

Ok I think we figured it out (and it was probably human error).
If you guys could try out the latest build (http://ci.thevoxelbox.com/job/VoxelSniper/286/) and let me know if this fixes this issue, I would greatly appreciate it.

commented

Now getting a new error:

C:\Users\Thomas\Documents\Servers\Please work>java -Xmx1024M -jar craftbukkit.ja
r -o true
Loading libraries, please wait...
[09:32:29 INFO]: Starting minecraft server version 1.7.2
[09:32:29 INFO]: Loading properties
[09:32:29 INFO]: Default game type: SURVIVAL
[09:32:29 INFO]: Generating keypair
[09:32:30 INFO]: Starting Minecraft server on *:25565
[09:32:30 INFO]: This server is running CraftBukkit version git-Bukkit-1.7.2-R0.
3-b3020jnks (MC: 1.7.2) (Implementing API version 1.7.2-R0.3)
[09:32:30 ERROR]: Could not load 'plugins\VoxelSniper-5.168.9-SNAPSHOT-javadoc.j
ar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
inLoader.java:176) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
.java:133) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.ja
va:350) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.(CraftServer.java:31
2) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
at net.minecraft.server.v1_7_R1.PlayerList.(PlayerList.java:63) [c
raftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
at net.minecraft.server.v1_7_R1.DedicatedPlayerList.(SourceFile:14
) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.jav
a:126) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
:424) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
... 9 more
[09:32:30 INFO]: Preparing level "world"
[09:32:31 INFO]: Preparing start region for level 0 (Seed: 7676581848913049061)
[09:32:31 INFO]: ----- Bukkit Auto Updater -----
[09:32:31 INFO]: It appears that you're running a Beta Build, when you've specif
ied in bukkit.yml that you prefer to run Recommended Builds.
[09:32:31 INFO]: If you would like to be kept informed about new Beta Build rele
ases, it is recommended that you change 'preferred-channel' in your bukkit.yml t
o 'beta'.
[09:32:31 INFO]: With that set, you will be told whenever a new version is avail
able for download, so that you can always keep up to date and secure with the la
test fixes.
[09:32:31 INFO]: If you would like to disable this warning, simply set 'suggest-
channels' to false in bukkit.yml.
[09:32:31 INFO]: ----- ------------------- -----
[09:32:32 INFO]: Preparing spawn area: 22%
[09:32:33 INFO]: Preparing spawn area: 58%
[09:32:34 INFO]: Preparing spawn area: 80%
[09:32:34 INFO]: Preparing start region for level 1 (Seed: 7676581848913049061)
[09:32:35 INFO]: Preparing spawn area: 42%
[09:32:36 INFO]: Preparing start region for level 2 (Seed: 7676581848913049061)
[09:32:37 INFO]: Preparing spawn area: 55%
09:32:38 INFO: Server permissions file permissions.yml is empty, ignoring it

commented

You've downloaded the Javadoc. You need the jar file that's not the documentation or source.

commented

oh soz

commented

Yes that works now thanks for your help

commented

I'm gonna mark this as closed then. In case this still is an issue let me know and reopen this issue.

commented

I've had the same problem on CB 1.7.2 and HelpfulBeast on Bukkit forums couldn't solve it. Any ideas anyone. How about upgrading to Java 8?

commented

Error message looks like this for me:

at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3023jnks]
Caused by: java.lang.UnsupportedClassVersionError: com/rylinaux/plugman/PlugMan : Unsupported major.minor version 51.0

commented

The problem is long solved. Parts of the jar were compiled with java 7 instead of the intended java 6, which resulted in it being unable to load on a java 6 runtime.
Upgrading to Java 8 would help you with running that particular version and it's something you should do regardless.

commented

Also what has this to do with VoxelSniper? This does in no way belong into the issue tracker here.

commented

Apart from that just looking at the maven build of that plugin you referenced, it looks like it's being build for Java 7 (https://github.com/rylinaux/PlugMan/blob/master/pom.xml#L85) and so you need at least Java 7 or higher to run it.

commented

Well apparently (according to "-java version" in terminal (yes I'm on Mac)) I do have Java 7 but it still doesn't work, and this is just one of many plugins that don't work, including:
Animal Protect,
KitEssentials,
SimpleAlias,
VoxelSniper,
PlugMan,
HubEssentials,
GiantCaveGenerator,
CityWorld,
BossBarMessgae,
AntiCommandTab,

commented

Oh and I've posted here because it's the same error message and also it's happening for VoxelSniper on my server, I just happened to post the PlugMan error as it was the first one in the log.

commented

Seems like one of the dependencies was compiled in Java 7.
I'll look into it.

commented

I am having the same problem and everything that i have tried have failed help would be awesome.

commented

Which Java version are you using?

commented

I am running Version 7, update 45 (build 1.7.2-R0.2.jar

commented

Version 7, update 45 (build 1.7.0_45-b18)

commented

Have you guys found out anything new

commented

I dont want to bother you but this plugin is needed for my server so your help would be awesome mostly because dont know how to fix this kind of thing

commented

I'm still unable to reproduce this issue.
Any additional information would be appreciated.

commented

For some reason it fixed it self when i added another plugin soooooo idk what happened
But thanks for your help

commented

Alright, I'm gonna close this ticket for now. If this reappears, you can simply reopen it.

commented

...Well mine ain't workin', and I'm the one who started the thread. What kind of information could you use btw?

commented

Since we are unable to reproduce your error, we have no clue how to fix it, yet.
Please post the output of java -version and additional information like operating system, OS version, kernel version (read the man page for uname if you're on linux). Information like VoxelSniper build number would be helpful as well.

commented

I have the same exact problem. I know how to fix but I am unable to find a Java 7 Update 45 download for mac. In Java 7 Update 51 there are unsupported class versions for the plugin which is stopping Voxelsniper from working. I hope this helps out but I am not exactly sure if this is a fix for the bug.

On the last line of the error below it says "Unsupported major.minor version 51.0" makes me believe it has something to do with Java 7 Update 51

"[14:04:05 ERROR]: Could not load 'plugins/VoxelSniper-5.168.9-SNAPSHOT (7).jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/thevoxelbox/voxelpacket/common/interfaces/IVoxelMessageSubscriber : Unsupported major.minor version 51.0"

commented

Like everyone else, I have the same problem. The same error, the same java, 1.7.2 R.2 and using the most recent development build (#277) on Jenkins. I kept my plugins to a minimum of essentials, world edit and voxel sniper. If you need the console then ask. Im not an expert but maybe it has something to do with our java version? It does say
"[14:04:05 ERROR]: Could not load 'plugins/VoxelSniper-5.168.9-SNAPSHOT (7).jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/thevoxelbox/voxelpacket/common/interfaces/IVoxelMessageSubscriber : Unsupported major.minor version 51.0"

commented
the same java

That doesn't really help since there are multiple implementations of the java runtime environment. Each implementation has multiple major versions and every major version has multiple builds. - So, please, post the complete output of java -version.

The error message Unsupported major.minor version 51.0 just says that the interface IVoxelMessageSubscriber has been compile for J2SE7 - which is java standard 7.
So a few ideas of what's going wrong:

  • The version of java you are using has a bug and does not detect class versions properly (kinda unlikely)
  • You have multiple JREs and the one that's in your path environment variable is not compatible with version 7 classes
  • Something weird going on with the java compiler we use.

I guess point two is what's happening here since we are not able to reproduce the error.

commented

I fixed the problem. I host this server on a mac, so I updated using OSX mavericks and it works now.

commented

I also had the error on an Ubuntu server with installed jre 6 and 7. After running sudo update-alternatives --config java I found out that the server actually used the jre 6. After setting it to jre 7 and a restart of Bukkit the error was gone.