I have a Java class that references the mongo-2.4 driver, and I use
this class to do a simple insert like this:
BasicDBObject parse = (BasicDBObject)
JSON.parse(new String(docIn.flatten()));
DBCollection collection = db.getCollection(collectionName);
collection.insert(parse);
I compile my new class and put both it and the driver on the classpath
of my server, which has a service that calls my new class. When the
call is made to my class I get the following error:
java.lang.NoSuchMethodError: com.mongodb.DBCollection.insert(Lcom/
mongodb/DBObject;)V
java.lang.NoSuchMethodError:
com.mongodb.DBCollection.insert(Lcom/mongod
b/DBObject;)V...
The only reference to this error that I can find online is here:
http://log4mongo.org/display/PUB/Log4mongo+for+Java
Since I am compiling with mongo-2.4.driver this shouldn't be a binary
compatibility issue though.
Any help you guys could give would be greatly appreciated.
eeb