Category "mongodb"

"The $changeStream stage is only supported on replica sets" error while using mongodb-source-connect

I get an error when running kafka-mongodb-source-connect I was trying to run connect-standalone with connect-avro-standalone.properties and MongoSourceConnector

Getting java.lang.NoSuchMethodError: org.springframework.cglib.core.ReflectUtils.defineClass while inserting data in mongo using Spring MongoTemplate

I am trying to insert some data (List of Objects) into mongoDB using Spring MongoTemplate and I am getting an exception: 14:08:04.430 [main] DEBUG org.springfr

Springboot With Mongodb Error while using find*() query

I am getting the following error: at com.aks.springStorage.SpringStorageApplication.main(SpringStorageApplication.java:22) [classes/:na] Caused by: org.sp

Mongo Dart SubDocument Updating and Editing

Hello I have a data like that: { "_id":ObjectID(), "field1":"field1 value", "group1":{ {"name": "name1", "favoriteBooks":{"book1","book2"}}, {"name": "name

Nestjs Mongodb always return empty array

I am trying to create a simple nestjs project that connects to mongodb. I followed the official documentation of nestjs, but connected to my own db with "user"

Importing data into MongoDB Atlas

I have a local database/collection that I created from an external .bson file using mongorestore. I'm able to access the collection from my local machine, howev

MongoDB/DocumentDB bson_append_array(): invalid array detected. first element of array parameter is not "0"

Recently I have migrated one of my projects (PHP 7.4/Lumen/Ubuntu 20.04) from MongoDB to MongoDB compatible AWS DocumentDB. Since the migration all the CLI Scri

Migrating to MongoDb Atlas from Local

I'm trying to migrate my local MongoDB over to Atlas. I managed to run the mongodump command with localhost and can see the files in ./dump/data.bson However,

Node.js Large File Uploads to MongoDB blocking the Event Loop and Worker Pool

So I want to upload large CSV files to a mongoDB cloud database using a Node.js server using Express, Mongoose and Multer's GridFS storage engine, but when the

Multer not adding file extension

I'm working on a Node.js/MongoDB based website and i'm trying to upload images directly on server using Express, Jade, and Multer, but no matter what i do, i ca

How to convert current datetime into given timezone and store in MongoDB & fetch in DD-MM-YYYY HH:mm format?

My local time is 'Asia/Kolkata.' And I have to convert the current DateTime into 'Pacific/Auckland' and store it into MongoDB And on fetch I have to format this

Can't Connect Mongoose to MongoDB - There is no established connection with mongoose and a mongoose connection is required

I was looking around in Discord.JS and creating a bot, but every time I want to turn on the bot, ( using node index.js) this error happens: throw new Error("Th

RoboMongo can't use array filters?

Following on from "How to update collection and increment hours for ISO date". It seem that RoboMongo can't execute a query with an array filter: This same

Issue with Arbiter feature compatibility after upgrade of replica set of two nodes with Arbiter to 3.6

I have upgraded MongoDB replica set to 3.6 following this instruction https://docs.mongodb.com/manual/release-notes/3.6-upgrade-replica-set/. When I executed co

MongoDB: subtract months from date, with value from database

Is it possible in MongoDB to somehow subtract only months from a date, with a value from the same document. So for example i have to subtract date from field "v

Find by _id on an array of objects in mongodb database

I'm trying to find the id of an object inside an array of objects. That _id has the same field name _id as others in the document. This is my model (brief) var

Failed to start mongod.service: Unit mongod.service not found

I follow all the steps mention in MongoDB installation documents for Ubuntu 16.04. Steps 1: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv

MongoDB command, mongod, is not functioning and closes itself

Posted below is my bash command line execution of mongod. I am not sure why it is not working properly and is resulting in the series of key:value pairs, follow

FindIterable<Document> how to get total records in a result of a query

I was using mongo driver for java 2.x and passed to 3.1. DBCursor is deprecated and I had to use the FindIterable<Document> structure. When I perform a q

FindIterable<Document> how to get total records in a result of a query

I was using mongo driver for java 2.x and passed to 3.1. DBCursor is deprecated and I had to use the FindIterable<Document> structure. When I perform a q