Here is the sample code. Error is on Line 3.
1 BasicDBObject dbo=new BasicDBObject(data); 2 DBCollection coll = new Mongo().getDB("test") 3 coll.save(dbo); 4 data.put(Entity.DB_ID, dbo.get(Entity.DB_ID));
Strangely, this error is showing when running as webapp from Tomcat6 and using mongo 2.4 or 2.5.3. With 2.0.rc3, it works fine. I want to use 2.5.3 Also, when runing from eclipse, or commandline, it works with all the three versions(2.0 ,2.4, 2.5.3) And the DBCollection class is being loaded because coll.insert(), coll.find() are working. Just that it is saying NoSuchMethodError when I call save().
This is a fresh install of Ubuntu 10.4 and tomcat6 on top of it. The JDK is OpenJDK java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1)