Sathish David Kumar N
asked on
.DataIntegrityViolationException: Cannot change the size of a document in a capped collection: 311 != 333
using the below code I have created capped collection for my document , while i am doing insert i am facing .dao.DataIntegrityViolationException: Cannot change the size of a document in a capped collection: 311 != 333; How to resolve this
Map<String, Object> commandArguments = new BasicDBObject();
commandArguments.put(CONVERT_TO_CAPPED,COLLECTION_NAME);
commandArguments.put(SIZE, 2147483648l);
BasicDBObject command = new BasicDBObject(commandArguments);
Document commandResult = database.runCommand(command);}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.