HomeSpawnPlus

HomeSpawnPlus

342k Downloads

1.12 pre release breaks HSP

frizzbee30 opened this issue Β· 22 comments

commented

1.12 pre release

1.12 appears to break HSP! Hoping that there will be an update, as this really is massively integrated into our server and the various worlds.

https://pastebin.com/tzaxR1mU

commented

Is there any workaround for getting a database working on a new install?

commented

install a old version (on a old server) and than update this plugin

commented

This is a very strange issue. The method to load the core.yml file does exist in the 1.12 bukkit API, so it should not be throwing java.lang.NoSuchMethodError. It may just be a matter of rebuilding the plugin for the 1.12 API, but that shouldn't be the case. I double checked and none of the org.bukkit.configuration.file API was deprecated in Spigot-API 1.12-pre2-SNAPSHOT.

I dont have time to look fully into it at the moment, but I will get around to it eventually if it causes an issue for my server, but that wont happen until 1.12 gets out of pre release and goes live.

In the mean time you or anyone else getting this issue could try building the jar against 1.12 and see if it makes a difference, and make sure to report back here with results.

commented

Thanks that's great, appreciated that you have had a look and will get round to it for 1.12 :D

commented

I ended up building against the 1.12-pre2-SNAPSHOT and it failed, but building against the last version 1.11.2-R0.1-SNAPSHOT works.

So something was removed/changed in the 1.12 API that was not documented yet, or at least not where I looked.

Notes for myself to come back to if the 1.12 API changes stick for release:
YamlConfiguration.loadConfiguration(File); replaces YamlConfiguration.load(File);
YamlConfiguration.loadConfiguration(String); replaces YamlConfiguration.load(String);
JavaPlugin.getTextResource(String) replaces JavaPlugin.getResource(InputStream)

Warning for self:
List<Class<?>> getDatabaseClasses() removed from org.bukkit.plugin.java.JavaPlugin in 1.12-pre2, but HomeSpawnPlusBukkit.jar overrides List<Class<?>> getDatabaseClasses(). So I don’t yet know what to do about this or how it is tied in with the rest of HSP, more digging is required, note check HSP documentation.

commented

Looks like a pretty gnarly change coming up in 1.12: they finally removed the ebean server. Probably long overdue for them to do this, but it does mean a good bit of surgery for HSP in order to update and shade in a recent ebean implementation.

I've had no time over the last few years to do much with HSP, which has been all well and good since the Bukkit API has been stable so nothing was really needed. And it was nice having a few people step in and help with some PRs to fix things as needed.

But seeing as how there are obviously still a number of servers out there still using HSP, I will take a look at this and see what it would take to get HSP working for the latest minecraft/bukkit releases.

commented

Awesome, we really appreciate that. If you do get caught up again then I can do a PR.
Also ignore my notes above, the current calls to load yaml files work correctly.

commented

That's great and really appreciated, there really is no other plugin out there that has the functionality of this one.
I'm certain if you copied it across to spigot forums, you would have a significant increase in the number of users, I also think it is a level well above a lot of 'premium' resources on there.

Looking forward to the update and thanks again! :)

commented

I worked on this last night and got past the hardest part: getting it to compile and run again by shading in a newer ebean server and working through all the issues to get that going. There's still more work and cleanup to be done, but at least I've done the basics to prove I can get things working again. In fact the majority of the code base is untouched so I don't expect any surprises, it was just a lot of changes to all the ebean storage code and a bunch of trial and error maven work to get things building and working in the runtime again.

I expect to be putting up a dev build for you guys to test with sometime over the weekend.

commented

New build posted (andune.com) that works in my basic local testing. Known issue is that it cannot create a new database at this time. Use an existing database or copy one from prod to your test servers. I'd appreciate you guys giving this some testing against v1.12. I haven't tested much more than the basic HSP capabilities using the default SQLite database.

commented

From testing b639 so far I have not had any issues, but I will do a more in depth test tomorrow to see if anything breaks.

commented

That was quick, thanks.

Edit: I do not get the error I originally posted, I had failed to copy my database settings over to the bukkit.yml config

commented

Hi, using external MySQL currently (defined in bukkit.yml), getting the error below. I haven't tried regenerating any of the folder files etc, just the settings that were active on our test server previously.

https://pastebin.com/Sn4vskH0

Thanks for looking into it. :)

commented

Works great! Thank you, obviously it's up to you, but it would be such a shame to confine the plugin to bukkit, there really isn't anything available like it on spigot!

Thanks again for taking the time to update it :)

commented

Build 640 posted which should fix your MySQL issue, @frizzbee30. Also I fixed new DB install process, so if you're standing up a fresh server for testing (or if someone new decides to start using HSP for the first time), HSP is able to initialize the database again.

commented

Brilliant, will try new build :)

commented

Thanks, i think Spigot don't create this parameters in 1.12.

now i geht only:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

commented

build HomeSpawnPlus-v2.1.0-SNAPSHOT-b641
https://pastebin.com/7nvVPEm4

commented

@seema84 this is caused when your bukkit.yml does not have database parameters. Please see issue #115 .
Having seen this a few times now, I suspect that recent versions of Spout aren't including the default settings any more.

commented

I added defaults to the code for bukkit.yml, so any new people trying to upgrade won't have the NPE startup error, they'll just get the previous bukkit.yml Sqlite defaults automatically. I also fixed the SLF4J warning on startup (it was benign, but nice to have a clean startup). build 642 posted. Closing this issue now, please report new issues for anything else you find with b642 or later.

commented

Hi, we don't have this issue as we specify an external MySQL location within bukkit.yml, as andune points out :)

commented

thanks andune <3