Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

420
Visualizações
CompilerException java.lang.ClassNotFoundException: org.bson.types while trying to connect to mongo with Monger

Trying to connect to Mongo using Monger and I get the following error

CompilerException java.lang.ClassNotFoundException: org.bson.types

I have added the dependency [com.novemberain/monger "3.1.0"] in project.clj and did a lein re-install and is trying to import bson.types as :import [org.bson.types ObjectId].

The monger dependency is reflecting in my auto generated pom.xml file as

<dependency>
<groupId>com.novemberain</groupId>
<artifactId>monger</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>

Am I missing any dependency or what am I doing wrong ? .

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Looks like monger depends on org.mongodb:mongodb-driver, which does not include the bson parts of the mongo driver. So you'd also need to include the bson dep explicitly, which is org.mongodb:bson.

Looks like they also publish a org.mongodb:mongodb-java-driver uberjar that includes the driver, bson, and other stuff in a single dep. If you added that you'd get everything (but you should probably exclude those deps pulled in by monger to avoid conflicts).

over 4 years ago · Santiago Trujillo Relatório

0

Monger Jar file dependency need to be added at your jar location. This help me resolved the issue. Hope it helps you too.

Download the Monger Jar file from the below link

https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver/2.10.1
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda