DarkAtra / v-rising-discord-bot

This bot allows you to display some information about your v rising server on Discord.
https://vrising.darkatra.dev
MIT License
15 stars 5 forks source link

fix: NPE when running the docker image #62

Closed DarkAtra closed 1 year ago

DarkAtra commented 1 year ago

In some cases the bot seems to fail to create the nitrite database.

image

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'database' defined in class path resource [de/darkatra/vrising/discord/DatabaseConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.dizitart.no2.Nitrite]: Factory method 'database' threw exception; nested exception is java.lang.NullPointerException: builder()
            .c?perties.databasePassword) must not be null

Discord Post: https://discord.com/channels/993243434695540837/993243434695540839/1082189504837865492 See also: https://github.com/nitrite/nitrite-java/issues/801

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 2.0.5-next.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

DarkAtra commented 1 year ago

The was caused because the mounted directory did not have correct file permissions for the default container user or group. There will also be a change in nitrite to give a better error message for such cases.