Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference

You could probably do activity!!.application!! to solve that error too, but it shouldn’t matter.
That database error is then because of something else. Most likely, the error is in the readAllData method being not suspend, so you should mark it as suspend and then in your repository turn readAllData into a suspend fun instead, this means that you’ll then need to change the val readAllData to a lateinit var readAllData inside of the UserViewModel by changing this line in the UserViewModel init code:

readAllData = repository.readAllData

to this

viewModelScope.launch {
    readAllData = repository.readAllData()
}

and that should be it