Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup Error on 1.0.1 - Java Dependency Issue. #57

Closed
Sonorpearl opened this issue Jan 18, 2012 · 44 comments
Closed

Startup Error on 1.0.1 - Java Dependency Issue. #57

Sonorpearl opened this issue Jan 18, 2012 · 44 comments
Assignees
Labels
Milestone

Comments

@Sonorpearl
Copy link

18:15:48 [SCHWERWIEGEND] Could not load 'plugins/Backup.jar' in folder 'plugins':
java.lang.UnsupportedClassVersionError: net/tgxn/bukkit/backup/BackupMain : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:171)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:215)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:151)
at org.bukkit.craftbukkit.CraftServer.(CraftServer.java:127)
at net.minecraft.server.ServerConfigurationManager.(ServerConfigurationManager.java:52)
at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:399)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

@tgxn
Copy link
Owner

tgxn commented Jan 19, 2012

Hmm, I have no idea what this means.

What java version are you running?

@rarepi
Copy link

rarepi commented Jan 19, 2012

I'm getting the same error.
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)

http://forums.bukkit.org/threads/fixed-plugin-wont-load.45205/#post-798940

Please compile with Java 6. :)

@Dreytac
Copy link

Dreytac commented Jan 19, 2012

I'll second this. It's a Java compiler version issue.

@quickclay
Copy link

Same error. Java up-to-date (auto updated).
CB 1783

@XxZeroxX
Copy link

Yeah, same here and it is sad since updates don't seem to be running for me. Even when I do a backup in console it never finishes or seems to run at all. Have had chunk issues on and off recently so it is kind of a big deal to be missing more than a day of backups ;(.

@tgxn
Copy link
Owner

tgxn commented Jan 20, 2012

Make sure you have JRE 1.7.

If this doesn't work, I'll change the dependencies and code back to 1.6.

Assigned priority, will fix in EMG Build 1.8.5E if required.

@ghost ghost assigned tgxn Jan 20, 2012
@rarepi
Copy link

rarepi commented Jan 20, 2012

Oracle recommends Java 6 for end users at the moment, so I would prefer 1.6 support, please.

@ghost
Copy link

ghost commented Jan 20, 2012

First of all Java 7 is stable :D I trust the filehippo.com cus hippos friggin rule and second @quickclay I dont recommend that version of CB as i have told everywhere, any CB build above 1776 will not work properly or atleast reload correctly.

For me the CB 1776 is the last one that can reload itself without no errors. running on Java 1.7. Update 2

@rarepi
Copy link

rarepi commented Jan 20, 2012

I didn't say Java 7 is unstable, I said Oracle currently recommends using Java 6.
For that reason most people still use Java 6, so you might get more issue reports about this in the future without support for it.

@Dreytac
Copy link

Dreytac commented Jan 20, 2012

I actually have dependencies on 1.6 that won't let me upgrade to 1.7 on my server. 1.6 is also the majority supported version at the moment and 1.7 isn't set as default on the Java website yet.

It'll be unfortunate if you can't support 1.6 because it means I'll have to look elsewhere.

@tgxn
Copy link
Owner

tgxn commented Jan 20, 2012

If you want to run the new version:
http://www.oracle.com/technetwork/java/javase/downloads/java-se-jre-7-download-432155.html

I've assigned this a milestone, but for the next few days till i get a chance to push this, i suggest you using build 1.8.4, So sorry guys, I didn't know how many people this would affect.

@Dreytac
Copy link

Dreytac commented Jan 20, 2012

Glad to hear your going back to 1.6. Will be keeping an eye out for the new build.

And at least you listen to your users unlike some mods that I've had to deal with. Much appreciated.

@tgxn
Copy link
Owner

tgxn commented Jan 20, 2012

It's just me working on it, so you will all have to be patient. (Even though I don't have this quality, I'm sure some of you must)

I will always listen to the users, because that's who the plugin is for. xD It's not logical to just do whatever I feel like.

But again, sorry for the hassle, Ill leave here links to the older builds for you that arent using 1.7.

Backup 1.8.4: http://dev.bukkit.org/server-mods/backup/files/8/
Dev Build before the Java dependencies changed: http://ci.tgxn.net/job/dev-Backup/13/

I am also going to refer all people having this problem to this Issue. Thanks :)

@tgxn
Copy link
Owner

tgxn commented Jan 20, 2012

TRY IT OUT FOR ME PLEASE:

869aefc
http://ci.tgxn.net/job/dev-Backup/17/

@hudson155
Copy link

When I go to:
http://www.oracle.com/technetwork/java/javase/downloads/jre-7u2-download-1377135.html
I'm not sure which one to download. I have Windows, but I am unsure about the online/offline x86/x64 deal. Can you please let me know how to determine which one to download?

@DiGitHubCap
Copy link

Unfortunately, the new build seems to be a bit buggy. On startup:

15:51:37 [SEVERE] Error occurred while enabling Backup v1.8.5E (Is it up to date?): String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at net.tgxn.bukkit.backup.config.Settings.getIntervalInMinutes(Settings.java:192)
at net.tgxn.bukkit.backup.BackupMain.onEnable(BackupMain.java:82)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:188)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:968)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:186)
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:169)
at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:348)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:335)
at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:165)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:399)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

Also, when a player quits:

15:56:23 [SEVERE] Could not pass event PLAYER_QUIT to Backup
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at net.tgxn.bukkit.backup.config.Settings.getIntervalInMinutes(Settings.java:192)
at net.tgxn.bukkit.backup.listeners.LoginListener.playerPart(LoginListener.java:65)
at net.tgxn.bukkit.backup.listeners.LoginListener.onPlayerQuit(LoginListener.java:42)
at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:272)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:161)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:651)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:550)
at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

@hudson155
Copy link

I assume the offline vs. online means that one installer uses internet connection while installing, that's why its so much smaller. I have a Program Files x86 folder that has java in it currently, so I am downloading the x86 version.

@DiGitHubCap
Copy link

Never mind my previous post actually, it was just an outdated config file.

@levifig
Copy link

levifig commented Jan 20, 2012

869aefc didn't fix it for me… :/

@hudson155
Copy link

I'd just like to say that updating to Java 7 fixed this problem for me.

@levifig
Copy link

levifig commented Jan 20, 2012

I got this after installing openjdk-7-* (and removing openjdk-6-*, btw):

java.lang.NullPointerException
        at net.tgxn.bukkit.backup.config.Strings.checkStringsVersion(Strings.java:63)
        at net.tgxn.bukkit.backup.BackupMain.onLoad(BackupMain.java:51)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:158)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:131)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)

@XxZeroxX
Copy link

I tried 1.8.5 with Java 7 x64 and it didn't fix it. I then tried 1.8.5 with Java x86 and it didn't fix it. I tried your last dev build on Jenkins with both those Java's installed and it didn't fix it... Still all errors =.

@levifig
Copy link

levifig commented Jan 20, 2012

I should add my server is running on Linux…

@XxZeroxX
Copy link

Well, I found my issue was with the bat file I made. Failed to think to change the jre6 line to jre7. In this case, you win ;).

@tgxn
Copy link
Owner

tgxn commented Jan 21, 2012

Everyone, You need to delete your configurations for them to re-generate them, then you can copy the settings over, sorry, I added a different versioning to the strings file, so you'll need to regenerate all the files.

This should fix most issues you are having, I'm going to push another to the dev branch.

Push: d14903c
CI 19: http://ci.tgxn.net/job/dev-Backup/19/ - 18 is OK, but 19 contains a couple more small changes, so i suggest 19. xD

@tgxn
Copy link
Owner

tgxn commented Jan 21, 2012

Closing issue as i believe the actual issues this is for is fixed:
java.lang.UnsupportedClassVersionError: net/tgxn/bukkit/backup/BackupMain : Unsupported major.minor version 51.0

Any other issues with versioning of yml files, please create a new ticket, thanks.

  • Otherwise if it relates to the original issue, please feel free to comment and ill re-open this.

@tgxn tgxn closed this as completed Jan 21, 2012
@rarepi
Copy link

rarepi commented Jan 21, 2012

Uhm, for some reason I'm still getting the error, tried
http://ci.tgxn.net/job/dev-Backup/19/
and
http://dev.bukkit.org/server-mods/backup/files/10-backup-1-8-5e-1-0-1-r1/

I have no idea whats wrong. o_ô
I checked the plugin.yml in the jar and it says "version: 1.8.5E", so I updated for sure.
I also deleted the config.yml.

Anyone else still having this issue?

@quickclay
Copy link

I am still getting this error as well.

@quickclay
Copy link

Oh wait.. we were supposed to regenerate the config files.. testing again.

@DiGitHubCap
Copy link

PinguinAman, what is your backinterval config setting set to? I believe that my issue was from it being just a number, and not having M, H, D, or W at the end.

It should NOT look like this:
backupinterval: 60

But instead something like this:
backupinterval: 60M

Also if that didn't work, try re-downloading the plugin.

@hudson155
Copy link

Everyone still having this problem, have you manually updated to Java 7 (an auto update will only do Java 6) and changed your batch (.bat) file to use the new Java 7 path?

@DiGitHubCap
Copy link

hudson155, the whole reason of this is patch is so that people wouldn't have to use Java 7.

@rarepi
Copy link

rarepi commented Jan 21, 2012

Still using the Java 6 Version I mentioned before: Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
As I said I deleted the config.yml. Then, after the config.yml got created automatically, I set the backupinterval to 90 minutes. ("backupinterval: 90M")

And just in case I didn't say it in a clear way:
I'm still getting this:

2012-01-21 14:57:50 [SEVERE] Could not load 'plugins/Backup.jar' in folder 'plugins':
java.lang.UnsupportedClassVersionError: net/tgxn/bukkit/backup/BackupMain : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:170)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:215)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:151)
at org.bukkit.craftbukkit.CraftServer.(CraftServer.java:127)
at net.minecraft.server.ServerConfigurationManager.(ServerConfigurationManager.java:52)
at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:399)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)

@DiGitHubCap
Copy link

Hm... I really have no idea why that might be happening. Maybe try re-downloading the plugin?

@tgxn
Copy link
Owner

tgxn commented Jan 21, 2012

@PinguinAman The issue is something to do with the version of Java you are running, the error suggests you are running the wrong verison of something, your Java version should be 1.6 or "jre6" and you should be running plugin version "1.8.5E" from the link you posted.

@quickclay Are you still having issues after re-generating your config files?

@hudson155 As @Hoot215 said, the whole reason for the emergency build was to roll back dependency on Java 1.7 to 1.6. So there is now no need to upgrade your Java, (Unless you want to of course).

@rarepi
Copy link

rarepi commented Jan 21, 2012

I have no idea what could be wrong on my side, since I have Java 1.6 (1.6.0_26-b03) and redownloaded the jar from those 2 links multple times. :/

@ghost
Copy link

ghost commented Jan 22, 2012

Hi there, I am also still getting the "java.lang.UnsupportedClassVersionError: net/tgxn/bukkit/backup/BackupMain : Unsupported major.minor version 51.0" error, just like @Hoot215 even when using 1.8.5E. I'd also like to note that I am not the owner of the physical system that my server is hosted on nor do I have root access, so upgrading to Java 7 is not an option.

@rarepi
Copy link

rarepi commented Jan 22, 2012

Older Versions of Backup work for me by the way, so there still has to be some kind of Java 7 stuff in 1.8.5E.

@tgxn tgxn reopened this Jan 22, 2012
@tgxn
Copy link
Owner

tgxn commented Jan 22, 2012

FML. Let me check now. Haha.

@Dreytac
Copy link

Dreytac commented Jan 22, 2012

Yeah, I just want to confirm this issue still persists with 1.8.5E and 1.8.6-dev. Running Java build 1.6.0_30-b12 here. Never run plugin before so no config files generated.

Running Bukkit dev build 1791 if that makes a difference.

@quickclay
Copy link

Confirming error persists after deleting config files. Did not generate new ones.

tgxn added a commit that referenced this issue Jan 27, 2012
- Should resolve Java dependency issues. (Issues #57, #60)
- Bukkit 1.1-R1 COmpatability. (Closes Issue #65)
- Tested on Windows 7, 64-bit, Java 1.6_30, CraftBukkit 1.1-R1 - No Issues.
@tgxn
Copy link
Owner

tgxn commented Jan 27, 2012

Should be resolved, Please test, thanks.

http://dev.bukkit.org/server-mods/backup/files/12/

@Dreytac
Copy link

Dreytac commented Jan 28, 2012

I can confirm this is now working for me.

@tgxn
Copy link
Owner

tgxn commented Jan 28, 2012

Thankyou, I had found the problem, It seems to be originating from Jenkins, Whenever it is built there, it would build with incompatible issues, so I've taken it down while I get it fixed.

It should be back up in a couple days after I can confirm it works. Sorry about these issues again.

@tgxn tgxn closed this as completed Jan 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants