MongoDB is a scalable, high-performance, open source, document-oriented database. This tag is used for questions related to the Java language bindings and drivers for MongoDB.
I am using java api for mongodb to parse the JSON string into Java object and storing it into MongoDB.
My JSON string will have fields that are date like the one given below.
"created":"2012-10-17 21:39:06.385987 +0000"
When I try to save the parsed…
I've been playing with the MongoInputFormat that allows having all documents in a MongoDB collection put through a MapReduce job written in Hadoop.
As you can see in the provided examples (this, this and this) the type the document is in that is…
I'm trying to set up a basic Spring MVC app with MongoDB intergration. Using Java 7 JDK
However when trying to build the project with Maven I am seeing a compilation error as follows:
[ERROR]…
I have two collections
checkone
{"_id":1,"name":"alex"},
{"_id":2,"name":"sandy"}
checktwo
{"_id":11,"password":"alex",tenant_id:{$ref:"checkone","$id":1}}
{"_id":12,"password":"suman",tenant_id:{$ref:"checkone","$id":2}}
when I do dbref…
I have a collection with embedded documents.
System
{
System_Info: "automated",
system_type:
{
system_id:1,
Tenant: [
{
Tenant_Id: 1,
Tenant_Info: "check",
…
I have several collections in my db.
I need to create a separate collection by getting the fields from different collections something like views in relational tables.
Is there any way to do it in mongodb?
I have two shards on three machines (using mongodb 1.8.2):
nodeI including: shard1(primary) and shard2(primary)
nodeII including: shard1(secondary) and shard2(secondary)
nodeIII including: shard1(arbiter) and shard2 (arbiter)
NodeII load…
I have a collection.
look
{ "_id" : 13.0 , "tenantref" : { "$id" : 3.0}}
I need to retrieve the value of id 3.0 using java.
I am getting null pointer exception.
BasicDBObject field = new BasicDBObject();
BasicDBObject field = new…
Hi I am newbie to mongodb.I am using java.
I have 2 tables system, system_properties in my relational table.
Something like this.
Table Fields values
System System_ID(PK),…
I have two collections
checkone
{"_id":1,"name":"alex"},
{"_id":2,"name":"sandy"}
checktwo
{"_id":11,"password":"alex",tenant_id:{$ref:"checkone","$id":1}}
{"_id":12,"password":"alex",tenant_id:{$ref:"checkone","$id":2}}
I am…
Possible Duplicate:
SQL view in mongodb
I am newbie to mongodb (java).
I need to know whether something like views(in relational) exists in mongodb?
Is it possible to create views mongodb?
I am newbie to mongodb (java).
I need to execute list of commands(queries in relational) by using something similar to procedures in relational db.
Is it possible in mongodb?
Log4j.properties file
log4j.rootLogger=ERROR, MongoDB
log4j.appender.MongoDB=org.log4mongo.MongoDbAppender
log4j.appender.MongoDB.databaseName=appName
log4j.appender.MongoDB.collectionName=test
When I build the application I get an error,
Could not…