The initialization of the DBManager has failed

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

mers
Posts: 16
Joined: 20 Dec 2017, 16:17

The initialization of the DBManager has failed

Postby mers » 10 Nov 2022, 10:17

Hello,

I make a new server SFS2X with database linked but i receive this error :

10:16:35,389 ERROR [main] db.SFSDBManager - java.lang.ClassNotFoundException :
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.ClassNotFoundException
Message: com.mysql.cj.jdbc.Driver
Description: The initialization of the DBManager has failed.
Possible Causes: if the database driver is not 'seen' int the server classpath the setup fails.
Make sure to deploy the driver .jar file in the extensions/__lib__/ folder and restart the Server.

I try all i can do but cant fix this bug
i use connector in Lib mysql-connector-java_8.0.30-1debian11_all have also mysql-connector-java-5.1.38
my __lib__ is empty
i drop my extension in extension folder call [myExtName]
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: The initialization of the DBManager has failed

Postby Lapo » 10 Nov 2022, 16:30

Hi,
did you copy the mysql java connector under SFS2X/lib/ ?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: The initialization of the DBManager has failed

Postby Lapo » 11 Nov 2022, 09:24

Hi,
the file you downloaded is an installer, rather than the library itself and it should be executed in order to deploy the required jar file.
In fact it has the .deb extension, while you need the java library which has a .jar extension name.

What you need to do:
- go back to the download page here: https://dev.mysql.com/downloads/connector/j/8.0.html
- in the "Select Operating System" choose "Platform Independent"
- download the .zip or .tar archive
- extract the archive, you'll find the mysql-connector-j-8.0.31.jar file

That's the file you need to deploy in SmartFoxServer

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
mers
Posts: 16
Joined: 20 Dec 2017, 16:17

Re: The initialization of the DBManager has failed

Postby mers » 11 Nov 2022, 11:13

I'm stupid, I think you understood that I'm not a linux user? lol
mers
Posts: 16
Joined: 20 Dec 2017, 16:17

Re: The initialization of the DBManager has failed

Postby mers » 11 Nov 2022, 11:37

All work fine now thx you
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: The initialization of the DBManager has failed

Postby Lapo » 11 Nov 2022, 15:26

Good to know :)
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 62 guests