Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » How can I use MongoDB with OM2M(Need help in helping in understanding how to use MongoDB with OM2M as there is a lack of documentation for the same. )
How can I use MongoDB with OM2M [message #1845070] Tue, 05 October 2021 16:00 Go to next message
Arjun T H is currently offline Arjun T HFriend
Messages: 1
Registered: October 2021
Junior Member
Hello,

I am a student and I was able to set up om2m with h2. But I would like to know how to set it up with MongoDB. The documentation does not seem to provide an answer as it only shows examples with h2. I tried adding a driver for mongo in config.ini. but that ended up in a Class not found error. What all changes are required to connect to Mongo? I am not well versed in Java and hence any help would be highly appreciated.

Regards,
Arjun
Re: How can I use MongoDB with OM2M [message #1851053 is a reply to message #1845070] Fri, 25 March 2022 17:23 Go to previous message
Suhas V is currently offline Suhas VFriend
Messages: 1
Registered: March 2022
Junior Member
Follow the below Steps

1. install Mongo Db in your system (Multiple resources available online) (default runs at 27071 port)

2. Create the below things in Mongo DB

DB-Name: mydb_in-name

Collection Names:
om2m_announce, om2m_resource

user: om2m
password: om2m

3. In the config.ini, Change the below values

org.eclipse.om2m.dbDriver = org.jkiss.jdbc.mongodb.mongodbDriver
org.eclipse.om2m.dbUrl = 127.0.0.1:27071

Now after starting the setup.bat/ sh file

4. type ss

5. disable EclipseLink service by entering stop id
eg: stop 42

6. enable mongo service by start id
eg: start 43

Hope this helps

Note:
Mongo Service needs to start every time

[Updated on: Sun, 03 April 2022 18:22]

Report message to a moderator

Previous Topic:Uncaught TypeError: net.Socket is not a constructor
Goto Forum:
  


Current Time: Sun Jul 03 03:47:52 GMT 2022

Powered by FUDForum. Page generated in 0.01815 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top