Setting up MongoDB with JavaFX in Intellij, MongoDB external Jar files throwing errors

27 Views Asked by At

Background

I am trying to run a MongoDB Database Accessor file in a JavaFX file on IntelliJ along with a basic main file, so far to connect with MongoDB I have added these external MongoDB jars to the Module dependencies (run<project structures<Modules<dependencies<add jars or directories). these

Problem Description The following error repeats multiple times when I try to call/access the files from the jars with my DatabaseAccessor file. (I have also called the jar files in Module-info file as running the main file threw other errors if I didn't). At this point it says the whole project build fails.

This is the error java: the unnamed module reads package org.bson.types from both org.mongodb.bson and mongo.java.driver

enter image description here

0

There are 0 best solutions below