HomeSpawnPlus

HomeSpawnPlus

342k Downloads

[Bug] Converting Essentials data to HSP doesn't work

D3v3l0per opened this issue ยท 13 comments

commented

Good evening,

I've been using HSP for some months on my local server.
On a different server, I tried to convert Essentials homes to HSP. Unfortunately, converting the data didn't work.
The following error occurred: http://pastebin.com/ec7ZP7yt
I'm using HSP Build #613.

Thanks for reading this ticket, I'm looking forward to using HSP on the server!

commented

Thank you for solving this problem. It does work now...well, converting still doesn't finish. After a while, the converting task aborts and "Error converting homes, check your server.log" appears in chat.
Here's the stack trace: http://pastebin.com/2jR7am8N

Do you have any ideas on how to fully and correctly convert homes?

Thanks!

commented

Please zip up your Essentials plugin directory and post a link to Dropbox or somewhere. I will download it and can run the conversion locally to try to reproduce the error you are getting. With my small sample set it worked fine, something is different in your environment.

commented

Well my best guess was that this was related to UUID, as all the conversion routines were written pre-UUID. My assumption was that I had coded UUID as a NOT NULL field for the Player object and it was giving this validation error because it wasn't being set. But after checking the code, I can see that I have left NOT NULL constraint off of UUID for now.

So I'm honestly not sure what is causing this. I will have to install Essentials and build up some home data files to try to convert them to see if I can reproduce the problem. Or if you could attach your Essentials plugin directory as a ZIP, I could use that directly. Feel free to put it up on dropbox or something where I can grab it and then you can remove the file once I have it (so it's not hanging out permanently attached to a github ticket).

commented

The latest dev build I see is from ~5 months ago, you don't mention your server environment. Is this 1.8? What version of Essentials are you using?

commented

I'm using the TeamCity version which has been made by the Spigot team. (https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/)

Our server is running Spigot 1.8.
I downloaded the dev build on http://andune.com/jenkins/job/HomeSpawnPlus/.

commented

OK thanks for the link to an Essentials working on Spigot 1.8. That's what I needed. I was able to setup a quick test and I can see this is a problem related to UUIDs. Easily fixed, I'll push some code shortly which you'll see here and Jenkins will automatically build a new version.

commented

Thank you very much for your short answer! I'll test it out ASAP!

commented

Good evening,

here's the link to the Essentials data: REMOVED

Thanks in advance!

commented

I have the file, you can delete it it. I will run some local tests. What HSP DB back end are you using?

commented

Wow, you have a lot of worlds! I had to do a good bit of setup locally to setup a similar server to yours. After doing so, I was finally able to reproduce the same error, so that's good news.

I'm not sure when I'll get a chance to do further debugging to fix it, but when I have time, it's highly likely I'll be able to figure out what is going on and fix this issue. Thanks for the data files, that was a big help in reproducing the error and will be a big help debugging the issue.

commented

More progress. The particular error I get when doing a fresh import is specific to user 'tommyb265'. The reason is this user has two Essentials data files:

01cadca2-0b18-3965-a66a-d1df850d83c8.yml:lastAccountName: tommyb265
45d3b1fe-89da-4b6e-9014-3017a8fe9f5b.yml:lastAccountName: tommyb265

So HSP imports the first one of these fine and then it's getting the exception because when it hits the second one, it is trying to create a duplicate home for the same user. I'm out of time for debugging now, but I suspect what I'll do is detect this situation and print a warning to the log, then keep going with the import. This way the import will succeed for the entire data set and you'll have a short list of warnings for any situations like this in your Essentials data.

commented

With the latest build and your test data, the import finished with 1592 homes. You'll see a number of exceptions in the log, I see at least 9 duplicate uuid/names in your data. HSP will print a warning like so:

[HomeSpawnPlus] Exception attempting to convert Essentials 2.9 home "c6" for player dax367

If you don't reset your HSP database, you'll see a lot more errors because you'll get an additional error for every home that HSP already imported from your last import. Best to start from a clean database. To do so, just remove HomeSpawnPlus.db and restart.

commented

Wow, thank you very, very much for putting so much effort into this plugin!
I appreciate your work!

I'll try to convert the Essentials data this evening.

Update:
Converting succeeded! The plugin works like a charm.