Cannot connect to MongoDB on localhost using JDBC

Because there is not collection named system.users in the corpus_test database.

Because there is user named corpus in the corpus_test database. It’s _id is corpus_test.corpus as per your own post. So it fails because the user already exist.

It doesn not show the corpus_test user but the user corpus of the corpus_test database. All users, even defined in another database are in the collection system.users of the admin database. The field named db of the user data indicates the authentication database.

It is not correct since it does not work.

You should

use admin

You createUser command seems the right one when executed after use admin.