What could i do to fix my driver v1.2 copy? checkout the nightly-build
for version 1.2 from git?
Many thx.
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>
error below:
---
java.lang.IllegalArgumentException: tried to save too large of an
object. max size : 2098176
at com.mongodb.ByteEncoder.getTooLargeException
(ByteEncoder.java:180)
at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:
196)
at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:
148)
at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:
143)
at mongo.MongoController.saveObject(MongoController.java:171)
---
On Jan 22, 2:43 pm, Eliot Horowitz <eliothorow...@gmail.com> wrote:
> The fix went into 1.2 - so if your'e seeing an error that's something else.
> Are you sure you're object just isn't too big?
> What's the error?
>
> On Fri, Jan 22, 2010 at 1:40 AM, mr.kschan <mr.ksc...@gmail.com> wrote:
> > i'm encountering the problem as inhttp://jira.mongodb.org/browse/JAVA-66
fyi, my binary is a 5.9Mb file upload pdf via http.
thx =]
On Jan 22, 2:47 pm, "mr.kschan" <mr.ksc...@gmail.com> wrote:
> I was getting the .jar fromhttp://github.com/mongodb/mongo-java-driver/downloads
On Jan 22, 2:55 pm, Eliot Horowitz <eliothorow...@gmail.com> wrote:
> Well that's the problem. The max object size is 4mb.
> If you want to store a 5.9mb file you should use GridFS
oops... thx for telling this ... so my app should use GridFS for those
collections (or entire db?) that will hv >4mb ...
Is this >4mb information better be placed in the tutorial on
http://www.mongodb.org/display/DOCS/Java+Language+Center =]
thx.
Its in the general docs - maybe not java section itself.
On Jan 22, 3:15 pm, Eliot Horowitz <eliothorow...@gmail.com> wrote:
> I would only put the files in gridfs.
>
> Its in the general docs - maybe not java section itself.
After reading the gfs-spec from the wiki, i wonder whether i should
store the bin by
GridFSInputFile f = gfs.createFile((byte[]) desc);
f.setContentType("sometype");
f.setFilename("somename");
f.save();
and ...
BasicDBObject o = new BasicDBObject();
o.put("something", something);
o.put("file", f);
coll.insert(o);
Or.. there should be some proper way to do so? Shall i just use o.get
("file") to retrueve that GridFSInputFile ??
thx
ks