Strange MongoDB Error When Incrementing A Document Property In Lucee CFML 5.2.9.31
DRANK

Yesterday, I ran into a really strange error when trying to increment a numeric value on an in-memory MongoDB document in Lucee CFML 5.2.9.31. Google didn't really provide any answers; so, I wanted to document the error here and share the work-around that I finally used.My ColdFusion code was attempting to read-in a MongoDB document that had a numeric property. Then, I was performing some logic around said document before incrementing that numeric property and saving the document back to the MongoDB database.At first, I used the post-increment operator: ++. This resulted in two different errors, randomly depending on the request:java.lang.IncompatibleClassChangeError - vtable stubjava.lang.IncompatibleClassChangeError - Class org.bson.Document does not implement the requested interface lucee.runtime.type.CollectionI have no idea what that first error, "vtable stub", means - I've never seen that one before. Most of the time, the issue manifested as the second error about the Lucee Coll…

bennadel.com
Related Topics: MongoDB