NPE on server start-up
SlimeDog opened this issue · 22 comments
Spigot 1.15.2 (Jenkins 2697)
MobHunting 7.0.9-SNAPSHOT-B1014
BagOfGold is not installed.
[06:38:14] [Server thread/INFO]: [MobHunting] Enabling MobHunting v7.0.9-SNAPSHOT-B1014
[06:38:14] [Server thread/INFO]: ^[[0;33;22m[MobHunting] ^[[mYour config version is 1^[[m
[06:38:14] [Server thread/INFO]: ^[[0;33;22m[MobHunting] ^[[mExisting config.yml loaded.^[[m
[06:38:14] [Server thread/INFO]: ^[[0;33;22m[MobHunting]^[[m Config.yml was backed up to plugins/MobHunting/backup/config.yml.bak2^[[m
[06:38:14] [Server thread/ERROR]: Error occurred while enabling MobHunting v7.0.9-SNAPSHOT-B1014 (Is it up to date?)
java.lang.NullPointerException: null
at one.lindegaard.Core.compatibility.BagOfGoldCompat.<init>(BagOfGoldCompat.java:17) ~[?:?]
at one.lindegaard.Core.Core.<init>(Core.java:40) ~[?:?]
at one.lindegaard.MobHunting.MobHunting.onEnable(MobHunting.java:143) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.15.2.jar-2020-06-19-2205:git-Spigot-a99063f-8ea9b13]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) [spigot-1.15.2.jar-2020-06-19-2205:git-Spigot-a99063f-8ea9b13]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) [spigot-1.15.2.jar-2020-06-19-2205:git-Spigot-a99063f-8ea9b13]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:464) [spigot-1.15.2.jar-2020-06-19-2205:git-Spigot-a99063f-8ea9b13]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:378) [spigot-1.15.2.jar-2020-06-19-2205:git-Spigot-a99063f-8ea9b13]
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:457) [spigot-1.15.2.jar-2020-06-19-2205:git-Spigot-a99063f-8ea9b13]
at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:274) [spigot-1.15.2.jar-2020-06-19-2205:git-Spigot-a99063f-8ea9b13]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot-1.15.2.jar-2020-06-19-2205:git-Spigot-a99063f-8ea9b13]
at java.lang.Thread.run(Thread.java:834) [?:?]
I see plugins/BagOfGoldCore/shared_config.yml. It does not contain copies of the deprecated configuration settings from plugins/MobHunting/config.yml.
File plugins/BagOfGoldCore/config.yml does not exist.
Due to previous bugs, these are the current settings in plugins/MobHunting/config.yml
dropmoneyonground:
# When a player get a money reward for a kill, the money will go directly
# into his pocket. If you set dropMoneyOnGround=true the reward will
# dropped on ground to be picked up by the player.
# Negative rewards will always be taken from the player.
#
# OBS Notice if you have the BagOfGold plugin installed these settings will be
# overruled by the settings in BagOfGold config.yml !!!
drop_money_on_ground: false
# If you dont want to use BagOfGold (https://dev.bukkit.org/projects/bagofgold)
# as you economy plugin, but still want to bags to be dropped on the ground,
# you can set this to true and then the player will be able to pick up the bags
# and use MobHunting signs to sell the Bags and get the money this way.
drop_money_use_item_as_currency: false
Prior to the bugs reported, these were set to true.
MH was pretty much disabled. No commands worked, and kill rewards were not being granted. Reverted to MobHunting 7.0.9-SNAPSHOT-B1012.
Rollback to which build? MH 7.0.8-b1005, for example, works correctly. But we shouldn't use any 7.0.9 build?
BTW, MobHunting should not create a subdirectory outside its own space: plugins/MobHunting. BagOfGold is a separate plugin. We do not use it as a currency, but only for bag drops -- a really great feature. Whatever BagOfGold core is needed for MobHunting should be included in MobHunting.
If BagOfGold is a dependency starting with 7.0.9, make that explicit, and we'll download and evaluate it. But it shouldn't be under the covers.
Oh no. Im working on a BIG change you need to rollback to the old version. You might get your databse ruined by using the DEV build at the moment.
You should rollback and delete the BagOfGoldCore folder until I am mready with the new version
BagOfGoldCore is data used by BOTH MobHunting and BagOfGold, putting the shared data in either BagOfGold or MobHunting, would not make sense if you dont use the other plugin. So where do you suggest that I place the shared settings? :-)
No matter if you use BagOfGold or not, MobHunting is depended of some of the code from BagOfGold. The heads with a value and the Bags is used in both plugins. I call it BagOfGoldCore. I have placed all the shared code in BagOfGoldCore and then I shade BagOfGoldCore into the others, so I dont need to maintain the same code twice.
It is like Multiverse-Core or Essentials Core.
I guess another solution to my shared settings would have been to put ALL settings into one folder, no matter which plugins you use.
Im pretty close to make a release now, making changes to this now will delay the release.
I think it is safe to test latest snapshot now
https://fractal.lindegaard.one:8181/job/MobHunting/
Build 1019 You should delete the BagOfGoldCore folder and make sure that "database_version" in your config.yml < 8
Spigot 1.15.2
MobHunting 7.5.0-b1019
updated from MobHunting 7.0.8-b1005
On server start:
[17:50:12] [Server thread/INFO]: [MobHunting] Enabling MobHunting v7.5.0-SNAPSHOT-B1019
[17:50:12] [Server thread/INFO]: ^[[0;33;22m[MobHunting] ^[[mYour config version is 1^[[m
[17:50:12] [Server thread/INFO]: ^[[0;33;22m[MobHunting] ^[[mExisting config.yml loaded.^[[m
[17:50:12] [Server thread/INFO]: ^[[0;33;22m[MobHunting]^[[m Config.yml was backed up to plugins/MobHunting/backup/config.yml.bak3^[[m
[17:50:12] [Server thread/ERROR]: Error occurred while enabling MobHunting v7.5.0-SNAPSHOT-B1019 (Is it up to date?)
java.lang.NullPointerException: null
at one.lindegaard.Core.compatibility.BagOfGoldCompat.<init>(BagOfGoldCompat.java:17) ~[?:?]
at one.lindegaard.Core.Core.<init>(Core.java:40) ~[?:?]
at one.lindegaard.MobHunting.MobHunting.onEnable(MobHunting.java:143) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot-1.15.2.jar-2020-06-21-1841:git-Spigot-a99063f-8ea9b13]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) [spigot-1.15.2.jar-2020-06-21-1841:git-Spigot-a99063f-8ea9b13]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) [spigot-1.15.2.jar-2020-06-21-1841:git-Spigot-a99063f-8ea9b13]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:464) [spigot-1.15.2.jar-2020-06-21-1841:git-Spigot-a99063f-8ea9b13]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:378) [spigot-1.15.2.jar-2020-06-21-1841:git-Spigot-a99063f-8ea9b13]
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:457) [spigot-1.15.2.jar-2020-06-21-1841:git-Spigot-a99063f-8ea9b13]
at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:274) [spigot-1.15.2.jar-2020-06-21-1841:git-Spigot-a99063f-8ea9b13]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot-1.15.2.jar-2020-06-21-1841:git-Spigot-a99063f-8ea9b13]
at java.lang.Thread.run(Thread.java:834) [?:?]
plugins/BagOfGoldCore/ was not created. Creating it manually did not resolve the issue.
.... So where do you suggest that I place the shared settings? :-)
I would recommend putting the shared bits in plugins/BagOfGold/, rather than creating an entirely new subdirectory.
Im sorry I forgot to make a commit before build a new snapshot yesterday, I will make a new snapshot in 10 min, where the above bug i solved.
Also I have moved the shared database and the shared config to the BagOfGold folder
Sorry for the delay. I found a bug I had to fix.
You can test latest snapshot now
https://fractal.lindegaard.one:8181/job/MobHunting/
Delete the BagOfGold folder and set database_version: 7 again (this makes MobHunting migrate playerdata into the BagOfGoldCore.db file in the BagOfGold folder
Spigot 1.15.2
MobHunting 7.5.0-b1022
updated from MobHunting 7.0.8-b1005 (so database version 7, as indicated below)
On server start-up:
[06:36:01] [Server thread/INFO]: ^[[0;33;22m[MobHunting] ^[[mDatabase version 7 detected.^[[m
[06:36:01] [Server thread/INFO]: ^[[0;33;22m[MobHunting]^[[0;32;1mCopying players from MobHunting til BagOfGoldCore database^[[m
[06:36:01] [Server thread/INFO]: ^[[0;33;22m[BagOfGoldCore] ^[[mAdding RandomBounty Player to BagOfGoldCore Database.^[[m
[06:36:02] [Server thread/INFO]: ^[[0;33;22m[BagOfGoldCore] ^[[mAdding RandomBounty Player to BagOfGoldCore Database.^[[m
[06:36:02] [Server thread/WARN]: org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
[06:36:02] [Server thread/WARN]: at org.sqlite.core.DB.newSQLException(DB.java:941)
[06:36:02] [Server thread/WARN]: at org.sqlite.core.DB.newSQLException(DB.java:953)
[06:36:02] [Server thread/WARN]: at org.sqlite.core.DB.throwex(DB.java:918)
[06:36:02] [Server thread/WARN]: at org.sqlite.core.NativeDB._exec_utf8(Native Method)
[06:36:02] [Server thread/WARN]: at org.sqlite.core.NativeDB._exec(NativeDB.java:94)
[06:36:02] [Server thread/WARN]: at org.sqlite.jdbc3.JDBC3Statement.executeUpdate(JDBC3Statement.java:109)
[06:36:02] [Server thread/WARN]: at one.lindegaard.Core.storage.DatabaseDataStore.createRandomBountyPlayer(DatabaseDataStore.java:447)
[06:36:02] [Server thread/WARN]: at one.lindegaard.Core.storage.DataStoreManager.createRandomBountyPlayer(DataStoreManager.java:125)
[06:36:02] [Server thread/WARN]: at one.lindegaard.MobHunting.storage.DatabaseDataStore.initialize(DatabaseDataStore.java:301)
[06:36:02] [Server thread/WARN]: at one.lindegaard.MobHunting.MobHunting.onEnable(MobHunting.java:208)
[06:36:02] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[06:36:02] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351)
[06:36:02] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480)
[06:36:02] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:464)
[06:36:02] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:378)
[06:36:02] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:457)
[06:36:02] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:274)
[06:36:02] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784)
[06:36:02] [Server thread/WARN]: at java.base/java.lang.Thread.run(Thread.java:832)
The error recurs frequently during game play. The bagofgoldcore.db contains only one table mh_PlayerSettings, which is empty. This does not inspire confidence that the database was updated correctly, or can be used. Is there a database schema that I can check? What else can I check?
I think I am missing a commit(); this is probably the reason why the database is empty :-(
OK, I deleted plugins/BagOfGold, reverted
database_version: 7
and updated to b1024. Errors have been fixed. Note that the following nodes in MobHunting/config.yml
dropmoneyonground:
# When a player get a money reward for a kill, the money will go directly
# into his pocket. If you set dropMoneyOnGround=true the reward will
# dropped on ground to be picked up by the player.
# Negative rewards will always be taken from the player.
#
# OBS Notice if you have the BagOfGold plugin installed these settings will be
# overruled by the settings in BagOfGold config.yml !!!
drop_money_on_ground: true
# If you dont want to use BagOfGold (https://dev.bukkit.org/projects/bagofgold)
# as you economy plugin, but still want to bags to be dropped on the ground,
# you can set this to true and then the player will be able to pick up the bags
# and use MobHunting signs to sell the Bags and get the money this way.
drop_money_use_item_as_currency: false
# This settings is deprecated.
# The setting is only keept so it can be copied to the BagOfGold folder.
drop_money_on_ground_itemtype: SKULL
# This settings is deprecated.
# The setting is only keept so it can be copied to the BagOfGold folder.
drop_money_command_alias: money
# This settings is deprecated.
# The setting is only keept so it can be copied to the BagOfGold folder.
drop_money_on_ground_item: GOLD_INGOT
# This settings is deprecated.
drop_money_on_ground_text_color: WHITE
# This settings is deprecated.
# The setting is only keept so it can be copied to the BagOfGold folder.
drop_money_on_ground_skull_reward_name: ''
# This is deprecated.
drop_money_on_ground_skull_reward_name_plural: ''
# This settings is deprecated.
# The setting is only keept so it can be copied to the BagOfGold folder.
drop_money_on_ground_skull_texture_value: eyJ0aW1lc3RhbXAiOjE0ODU5MTIwNjk3OTgsInByb2ZpbGVJZCI6IjdkYTJhYjNhOTNjYTQ4ZWU4MzA0OGFmYzNiODBlNjhlIiwicHJvZmlsZU5hbWUiOiJHb2xkYXBmZWwiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzM5NmNlMTNmZjYxNTVmZGYzMjM1ZDhkMjIxNzRjNWRlNGJmNTUxMmYxYWRlZGExYWZhM2ZjMjgxODBmM2Y3In19fQ==
# This settings is deprecated.
# The setting is only keept so it can be copied to the BagOfGold folder.
drop_money_on_ground_skull_texture_signature: m8u2ChI43ySVica7pcY0CsCuMCGgAdN7c9f/ZOxDZsPzJY8eiDrwxLIh6oPY1rvE1ja/rmftPSmdnbeHYrzLQ18QBzehFp8ZVegPsd9iNHc4FuD7nr1is2FD8M8AWAZOViiwlUKnfd8avb3SKfvFmhmVhQtE+atJYQrXhJwiqR4S+KTccA6pjIESM3AWlbCOmykg31ey7MQWB4YgtRp8NyFD3HNTLZ8alcEXBuG3t58wYBEME1UaOFah45tHuV1FW+iGBHHFWLu1UsAbg0Uw87Pp+KSTUGrhdwSc/55czILulI8IUnUfxmkaThRjd7g6VpH/w+9jLvm+7tOwfMQZlXp9104t9XMVnTAchzQr6mB3U6drCsGnuZycQzEgretQsUh3hweN7Jzz5knl6qc1n3Sn8t1yOvaIQLWG1f3l6irPdl28bwEd4Z7VDrGqYgXsd2GsOK/gCQ7rChNqbJ2p+jCja3F3ZohfmTYOU8W7DJ8Ne+xaofSuPnWODnZN9x+Y+3RE3nzH9tzP+NBMsV3YQXpvUD7Pepg7ScO+k9Fj3/F+KfBje0k6xfl+75s7kR3pNWQI5EVrO6iuky6dMuFPUBfNfq33fZV6Tqr/7o24aKpfA4WwJf91G9mC18z8NCgFR6iK4cPGmkTMvNtxUQ3MoB0LCOkRcbP0i7qxHupt8xE=
# This settings is deprecated.
# The setting is only keept so it can be copied to the BagOfGold folder.
deny_hoppers_to_pickup_money_on_ground: true
# This settings is deprecated.
# The setting is only keept so it can be copied to the BagOfGold folder.
limit_per_bag: 10000.0
are marked deprecated
, but of those only
limit_per_bag: 10000.0
is replicated in BagOfGold/bagofgoldbase.yml.
Yes, but I have not been able to reproduce the bug. So I am studying the code now. I might have found a bug..
please test build 1024. my database is not empty now on first start. your players should be in there now, when the server is loaded.
some of the settings got new names, i have tried to make them more clear. I copy the settings from the old name to the new name. Only denomination for Gringotts_Style is not copied. (I didnt know how do to do it)...
OK. It would have been nice if the comments in MobHunting/config.yml included the mappings in BagOfGold/bagofgold.yml.
I think this i fixed in newest SNAPSHOTS
https://fractal.lindegaard.one:8181/job/BagOfGold/
https://fractal.lindegaard.one:8181/job/MobHunting/
Please take backup before updating to BagOfGold 3.0.0 or MobHunting 7.5.0 I have mad big and many changes in these builds.
I need help with the testing.
When you use ANY one of these two build you will get some new files in the folder BagOfGold called bagofgoldcore.yml and bagofgoldcore.db. The both contain shared settings / data used by both plugins.
It also contain the new mobs in MC 1.16.1 (Hoglin, Piglin, Strider and Zoglin)
Please create a new ticked if you find new bugs.