garagepoort / StaffPlusPlus

The ultimate moderation plugin
GNU General Public License v3.0
41 stars 24 forks source link

Cannot instantiate bean with type net.shortninja.staffplus.core.application.database.DatabaseInitializer. #244

Open sidboy55555 opened 6 days ago

sidboy55555 commented 6 days ago

Hi,

I'm getting the following error while using the 1.20.6 version of the plugin on a 1.20,6 server.

error: https://pastebin.com/BQEm31Dh

some more relevant information

version [18:21:57 INFO]: Checking version, please wait... [18:21:57 INFO]: Current Purpur Version: 1.20.6-2233-0d6766e (MC: 1.20.6)*

any idea on how to fix this? Thanks in advance

garagepoort commented 6 days ago

@sidboy55555 the database connection is failing. either disable the MySQL database in the config. Or make sure the database is reachable and the credentials are filled in correctly. It's recommended to put the password in between double quotes in the config file

sidboy55555 commented 6 days ago

The storage inside the config is on sqlite, so no mysql connection is used. It's the default config which I am using.

garagepoort commented 6 days ago

Is it possible the directory permissions for the plugin directory are incorrect. So it can't create the SQLite database file?

sidboy55555 commented 6 days ago

Pterodactyl automatically corrects the permissions of the server files, so yes they are correct. Furthermore, I tried to run the exactly same plugins on a fresh installed server which seems to work just fine, but with a fresh install of the server which had the issue the issue persists for some reason, very strange since the servers are identical, except of folder path that is.

rautamiekka commented 6 days ago

Lines 37-41 make me believe the Purpur installation is somehow missing the SQLite driver, likely caused by Pterodactyl, cuz I can't imagine why something so basic and extremely commonly used would be dropped by Purpur. Not even by Pterodactyl, or any antivirus/-malware (unless the driver is external and accidentally considered malicious), frankly.

Pterodactyl automatically corrects the permissions of the server files, so yes they are correct.

Check the perms just in case anyway.

sidboy55555 commented 6 days ago

I've checked the perms, and everything was fine. I placed the purper jar from the test server where the plugin was working to the server where it wasn't working. nothing changed. but I already swapped servers, now the test server is the main server. this is a very strange case.

garagepoort commented 5 days ago

Lines 37-41 make me believe the Purpur installation is somehow missing the SQLite driver

Indeed the driver is missing or not loaded. I missed that part. It might be possible the driver was not loaded. I updated the code to force load the driver class. Try downloading the new 1.20.7 jar. I'll release it in a bit

garagepoort commented 3 days ago

@sidboy55555 can you confirm whether this works or not?