Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crashes on every start #251

Open
RainOfPain125 opened this issue Nov 11, 2021 · 3 comments
Open

Server crashes on every start #251

RainOfPain125 opened this issue Nov 11, 2021 · 3 comments

Comments

@RainOfPain125
Copy link

https://www.toptal.com/developers/hastebin/uyuqesukec.yaml

I added all the plugins. Server would not start because namelayers will close the server if not given access to an SQL.

I gave namelayers access to an SQL and the server successfully works.

I then gave the rest of the plugins that needed a database, their own database, and it no longer starts.

@Maxopoly
Copy link
Member

The error seems to be related to the configuration of CivModCore. Could you pastebin that config (censor the password)?

@Protonull
Copy link
Contributor

Looking at the stacktrace, this is the offending line of code. I'm therefore guessing that @RainOfPain125's config looks something along the lines of:

database:
  ==: vg.civcraft.mc.civmodcore.dao.ManagedDatasource
  plugin: CivModCore
  user: username
  password: 1234 # HERE'S THE PROBLEM
  host: localhost
  port: 3306
  database: minecraft
  poolsize: 5
  connection_timeout: 10000
  idle_timeout: 600000
  max_lifetime: 7200000

ie, that the password is being parsed as a number, so it fails when the parser attempts to cast it to a String. The quick fix is to encapsulate the password inside quotations, like so: password: "1234", but a systematic solution could be update the parsing method itself to use String.valueOf(Object) as a parser.

@RainOfPain125
Copy link
Author

adding quotations did infact fix this bug. of course, there are a million other bugs and crashes from other plugins now. pog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants