MongoEMF with bndtools and EMF models

47 views
Skip to first unread message

Fábio Costa

unread,
Aug 9, 2015, 5:01:31 PM8/9/15
to MongoEMF
After maybe 10, 12 hours of intensive reading I have finally managed to bootstrap my mongo osgi service behind felix. But when I generated my model the project stopped working, complaining about the version of the package org.osgi.framework. I tried all day long and couldn't run the example from the website. Do you guys have an up to date environment like mine? What should I do?  I'm using bndtools. I also tried the p2 approach, which didn't work as well. 

Bryan Hunt

unread,
Aug 9, 2015, 6:58:23 PM8/9/15
to mong...@googlegroups.com
I would recommend getting your code working without the MongoEMF dependency.  Once your environment is set up, add in MongoEMF.  I’m a big fan of Bndtools, but getting EMF to play nice is painful.  You may be better off starting with p2.

Bryan

On Aug 9, 2015, at 4:01 PM, Fábio Costa <fcost...@gmail.com> wrote:

After maybe 10, 12 hours of intensive reading I have finally managed to bootstrap my mongo osgi service behind felix. But when I generated my model the project stopped working, complaining about the version of the package org.osgi.framework. I tried all day long and couldn't run the example from the website. Do you guys have an up to date environment like mine? What should I do?  I'm using bndtools. I also tried the p2 approach, which didn't work as well. 

--
You received this message because you are subscribed to the Google Groups "MongoEMF" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoemf+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fábio Costa

unread,
Aug 9, 2015, 7:52:39 PM8/9/15
to mong...@googlegroups.com
I have managed(more or less) to work with bndtools. I used equinox instead of felix.Now I need to understand how to start the resourceFactory service

--
You received this message because you are subscribed to a topic in the Google Groups "MongoEMF" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongoemf/aDXoKXd9NYo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongoemf+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Systems Analyst
Sun Certified Programmer for the Java Platform, Standard Edition 5
Sun Certified Business Component Developer for the Java Platform, Enterprise Edition 5

Fábio Costa

unread,
Aug 9, 2015, 8:34:36 PM8/9/15
to mong...@googlegroups.com
Ok, the emodelling services were move to the components bundle. Done. Almost working. Now the resourceFactorySet works but the call "createResource" not. How do I test this? I have successfully accessed mongoDB from a component, and the URL seems correct. But the factorySet is always returning null... 

Bryan Hunt

unread,
Aug 9, 2015, 9:08:47 PM8/9/15
to mong...@googlegroups.com
On the OSGi command line, use the “ls” command to list the services and see which are active.  My current guess is that one or more of the services are not active.  Also, a good place to start with a breakpoint is MongoURIHandlerImpl.canHandle()

Bryan

Fábio Costa

unread,
Aug 10, 2015, 9:10:16 AM8/10/15
to mong...@googlegroups.com
You were right, I was missing the mongoemf handlers bundle. Now it does return a resource, but says "java.net.MalformedURLException: unknown protocol: mongodb" during save. Something else to integrate?

Fábio Costa

unread,
Aug 10, 2015, 9:44:04 AM8/10/15
to mong...@googlegroups.com
Hi Bryan, I'm proud to say that it's everything working now. Some points of the wiki should be revised, later I will create a step by step reference to help you with this. 

Bryan Hunt

unread,
Aug 10, 2015, 12:06:12 PM8/10/15
to mong...@googlegroups.com
I believe the wiki is available for everyone to edit.

Bryan
Reply all
Reply to author
Forward
0 new messages