Compiling: MongoDB error

1 view
Skip to first unread message

Sayat Satybaldiev

unread,
Sep 23, 2013, 11:16:17 PM9/23/13
to BG-Social...@googlegroups.com
Hi,

I'm trying to use BG to use it with mongodb client but I have troubles with ant-contrib-1.0b3.jar.

I'm using Mac OS X. What I've did so far.

1. Unziped BGv0.1.4344.zip
2. Compile with: 
ant clean
ant 
ant dbcompile-mongodb - > to compile mongdb client too.
3. Then I try to execute the client: 
java -cp build/bg.jar;db/MongoDB/lib/*; edu.usc.bg.base.Client -schema -db MongoDB.MongoDbClient -p mongodb.url=127.0.0.1:27017 
it gives me following error:
-bash: db/MongoDB/lib/ant-contrib-1.0b3.jar: Permission denied
So, I've changed permission with chmod +x comman and the error gone. However, now it gives me the following error:


db/MongoDB/lib/ant-contrib-1.0b3.jar: line 1: PK: command not found
db/MongoDB/lib/ant-contrib-1.0b3.jar: line 2: ?]b5: command not found
db/MongoDB/lib/ant-contrib-1.0b3.jar: line 3: syntax error near unexpected token `)'
db/MongoDB/lib/ant-contrib-1.0b3.jar: line 3: ?]b5??????META-INF/MANIFEST.MFM??? Ew???>???M;upjӵAĔ???????ܓ{?lSf/[????.H?j?PX%o)?E???X?????lD??`p&.iO???`??????P?o?;??????J??F? ??H?HJ(?PK'
-bash: build/classes/edu/usc/bg/base/Client: No such file or directory

Shahram Ghandeharizadeh

unread,
Sep 24, 2013, 9:29:33 AM9/24/13
to BG-Social...@googlegroups.com
Try to give read permission to the jar file and see if it works:  chmod u+r db/MongoDB/lib/ant-contrib-1.
0b3.jar

It appears that the permissions in your directory structure might be off. It is good practice to download, unzip, and use as one user.
Shahram.


--
You received this message because you are subscribed to the Google Groups "BG Social Benchmark" group.
To unsubscribe from this group and stop receiving emails from it, send an email to BG-SocialBenchm...@googlegroups.com.
Visit this group at http://groups.google.com/group/BG-SocialBenchmark.
For more options, visit https://groups.google.com/groups/opt_out.

Sumita Barahmand

unread,
Sep 24, 2013, 9:57:38 AM9/24/13
to BG-Social...@googlegroups.com
Hi,

1. Did your ant complete successfully?
2. I think the way you are setting the classpath is slightly incorrect. Can you try using ":" instead of ";". So you will have something like the following:
-cp build/bg.jar:db/MongoDB/lib/*

Sumita

Sayat Satybaldiev

unread,
Sep 24, 2013, 4:32:44 PM9/24/13
to BG-Social...@googlegroups.com
Thank you for your replies! 

Yea, I've managed to fix this errors and sucessfully created the schema. The problem was that I need to give additional property the client and specifyt the schema: 

-p mongodb.database="local"

and write mongoDB url with lower characters like this: -p mongodb.url=127.0.0.1:27017

Wright now I have an issue with populating the schema with data. I use example from tutorial with following commands:

java -cp build/bg.jar:db/MongoDB/lib/* edu.usc.bg.base.Client -load -db  mongoDB.MongoDbClient -P /Users/sayatsatybaldiyev/Documents/Education/USC/CS685_Advanced_DB/software/BG/workloads/populateDB -p mongodb.url=127.0.0.1:27017 -p insertimage=true -p imagesize=2 -p threadcount=1 -p mongodb.database=local

And it gives Null Pointer Error:

*****max execution time specified : 0
BG Client: ThreadCount =1

Loading workload...
Connected
Creating the initial zipfian probabilities...
Sum of original probs = 0.9999999999999961
Initial Zipfian probabilities are created.
Done creating clusters.
ClusterId0, 10000
ZipfianMean=0.27 Usercount=10000 numMaxClusters=1; 20.0% of members have, 0.6207969279431967, initial probability.
ZipfianMean=0.27 Usercount=10000 numMaxClusters=1; 20.0% of members have, 0.6207969279431991 clustering(new)probability.
Time to create fragments :97 msecs
Done dividing users
java.lang.NullPointerException
Insertion failed. Make sure the appropriate data store schema was created.

Sayat Satybaldiev

unread,
Sep 24, 2013, 4:36:40 PM9/24/13
to BG-Social...@googlegroups.com
it looks like that java client can't find the schema. I look inside mongo local schema. And it gives me following:

> show collections
manipulation
photos.chunks
photos.files
resources
startup_log
system.indexes
thumbnails.chunks
thumbnails.files

I don't see user collection. May it be that -schema flag created a wrong schema for me?

pallav rustogi

unread,
Sep 24, 2013, 5:39:40 PM9/24/13
to BG-Social...@googlegroups.com
Hi Sayat,

Can you execute >show dbs 
and see if the local db is created.. And then >use local
then do a show collections.

For mongo you dont need to create a collection. As soon as you insert a data, it will create collection automatically. I think its giving you null pointer exception as you have not included  -p mongodb.writeConcern="normal" Property.

Regards
Pallav


--
You received this message because you are subscribed to the Google Groups "BG Social Benchmark" group.
To unsubscribe from this group and stop receiving emails from it, send an email to BG-SocialBenchm...@googlegroups.com.
Visit this group at http://groups.google.com/group/BG-SocialBenchmark.
For more options, visit https://groups.google.com/groups/opt_out.



--
Thanks and Regards
Pallav Rustogi

"Every Little Thing you do will lead you to success one day"

Sayat Satybaldiev

unread,
Sep 24, 2013, 6:14:18 PM9/24/13
to BG-Social...@googlegroups.com
Hi Pallav,

Yep, you got it right. Now everything is working properly. Thanks so much!

~Sayat
To unsubscribe from this group and stop receiving emails from it, send an email to BG-SocialBenchmark+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages