Still Working on the Protocol Problem

Skip to first unread message

Geoffry Roberts

Nov 4, 2013, 4:22:06 PM11/4/13

If things are working properly, should the following call: resourceSetFactory.getResourceSetConfigurators() return an empty set?  The reason I ask is because that's what I am getting from MongoResourceSetFactoryComponent, an empty set.  If this is not correct, is there anything I should be doing to preclude this empty set?


Bryan Hunt

Nov 4, 2013, 4:37:28 PM11/4/13
Hi Geoffry,

resourceSetFactory.getResourceSetConfigurators() should be returning one configurator if everything is wired up correctly.  The configurator is supplied by the mongoemf.handlers bundle.  The next step is to see why that service is not created.

This is what I see when I run the MongoEMF example ...

osgi> ls
All Components:
ID State Component Name Located in bundle
1 Active
2 Active org.eclipselabs.mongoemf.handlers.mongoURIHandlerProvider org.eclipselabs.mongoemf.handlers(bid=8)
3 Active
4 Active org.eclipselabs.mongoemf.query.mongodb org.eclipselabs.mongoemf.query.mongodb(bid=13)
5 Active org.eclipselabs.mongoemf.streams.factory org.eclipselabs.mongoemf.streams(bid=27)
6 Activating org.eclipselabs.mongoemf.exampleComponent org.eclipselabs.mongoemf.example(bid=32)
7 Active org.eclipselabs.mongoemf.example.config org.eclipselabs.mongoemf.example(bid=32)
8 Active org.eclipselabs.emongo.clientProvider org.eclipselabs.emongo.components(bid=34)
9 Active org.eclipselabs.emongo.databaseProvider org.eclipselabs.emongo.components(bid=34)
10 Unsatisfied org.eclipselabs.emongo.idFactory org.eclipselabs.emongo.components(bid=34)
11 Active org.eclipselabs.emongo.components.client.metatype org.eclipselabs.emongo.components(bid=34)
12 Active org.eclipselabs.emongo.components.database.metatype org.eclipselabs.emongo.components(bid=34)
13 Active org.eclipselabs.emongo.components(bid=34)
14 Active org.eclipselabs.mongoemf.converter org.eclipselabs.mongoemf.converter(bid=38)
15 Active


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
For more options, visit

Message has been deleted

Geoffry Roberts

Nov 5, 2013, 1:30:02 PM11/5/13

We're making progress.  I took pains to ensure that the components that were active on your list were also active on mine.  I fixed a problem and the protocol problem seems to have been resolved.

Do you know what the "'no null' constraint" refers to? It's thrown when the following line of code executes.

ResourceSet resourceSet = resourceSetFactory.createResourceSet();

Here's the complete error message:

java.lang.IllegalArgumentException: The 'no null' constraint is violated

at org.eclipse.emf.common.util.AbstractEList.validate( ~[na:na]

at org.eclipse.emf.common.util.BasicEList.addUnique( ~[na:na]

at org.eclipse.emf.common.util.AbstractEList.add( ~[na:na]

at ~[na:na]

at ~[na:na]

It would appear the problem is with one of these two calls, probably the latter.

ResourceSetUriHandlerConfiguratorComponent // The class name


URIConverter uriConverter = resourceSet.getURIConverter();

EList<URIHandler> uriHandlers = uriConverter.getURIHandlers();

At first, I thought one of the above values was null but as you can see, both values are set.  So what could be null?  It can't be something in my model, because it hasn't been tried yet.



org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl@29058cbf, org.eclipse.emf.ecore.resource.impl.EFSURIHandlerImpl@2b5b64a3, org.eclipse.emf.ecore.resource.impl.ArchiveURIHandlerImpl@7d2c1f91, org.eclipse.emf.ecore.resource.impl.URIHandlerImpl@5bcca8ca]

Bryan Hunt

Nov 5, 2013, 1:59:12 PM11/5/13
Hi Geoffry,

Looking at the code in it looks like you have a UriMapProvider registered that is returning a URI map that contains a null value.  Do you have some leftover code that is attempting to configure a UriMapProvider?


Geoffry Roberts

Nov 6, 2013, 11:52:14 AM11/6/13

Good call! I did have a forgotten leftover, sloppy coding on my part.

However, once that was cleaned up, I find myself back at the same old protocol problem this time I'm showing two confgurators. By removing one bundle or the other, I can reduce to a single confgurators, but no matter.  With either or both, the error is the same.

11:27:48.334 [Gogo shell] INFO  iop.storet.cmd.StoretCommand -

11:27:48.334 [Gogo shell] INFO  iop.storet.cmd.StoretCommand - rsc=org.eclipselabs.emodeling.components.ResourceSetUriHandlerConfiguratorComponent@408b1bdc

  I took a drill down look into the resource that gets instantiated in the process.  It has a uri with mongodb as the scheme.

You support a bndtools repository that contains all the mongoemf bundles, but neither the bundles for emongo, nor emodeling.  I'll allow that there could be some problem in that I did the builds of these two bundle sets.  Could you put us a repository of your builds that contains exactly what someone needs to get going, all precompiled and ready to use?  The idea would be that a neophyte would install every one of these bundles and be good to go.  I think would help your project gain adoption if there were a quick way to get something working.

I've included the console listing from my environment as it was when the error was thrown.

lb -s


   ID|State      |Level|Symbolic name

    0|Active     |    0|org.eclipse.osgi (3.9.1.v20130814-1242)

    1|Active     |    1|ch.qos.logback.classic (1.0.0)

    2|Active     |    1|ch.qos.logback.core (1.0.0)

    3|Active     |    1| (12.0.1)

    4|Active     |    1|iop.storet.cmd.command (0.0.0)

    5|Active     |    1|javax.servlet (2.5.0.v200910301333)

    6|Active     |    1| (2.0.17.v201004271640)

    7|Active     |    1|org.apache.felix.configadmin (1.6.0)

    8|Active     |    1|org.apache.felix.gogo.command (0.12.0)

    9|Active     |    1|org.apache.felix.gogo.runtime (0.10.0)

   10|Active     |    1| (0.10.0)

   11|Active     |    1|org.apache.felix.http.jetty (2.2.0)

   12|Active     |    1|org.apache.felix.log (1.0.1)

   13|Active     |    1|org.apache.felix.scr (1.6.2)

   14|Active     |    1|org.apache.felix.webconsole (3.1.8)

   15|Active     |    1|org.eclipse.core.contenttype (3.4.200.v20130326-1255)

   16|Active     |    1| (3.5.300.v20130429-1813)

   17|Active     |    1|org.eclipse.core.runtime (3.9.0.v20130326-1255)

   18|Active     |    1|org.eclipse.emf (2.6.0.v20130902-0605)

   19|Active     |    1|org.eclipse.emf.common (2.9.1.v20130827-0309)

   20|Active     |    1|org.eclipse.emf.ecore (2.9.1.v20130827-0309)

   21|Active     |    1|org.eclipse.emf.ecore.xcore.lib (1.0.0.v20130903-0948)

   22|Active     |    1|org.eclipse.emf.ecore.xmi (2.9.1.v20130827-0309)

   23|Active     |    1| (1.3.100.v20130327-1442)

   24|Active     |    1|org.eclipse.equinox.common (3.6.200.v20130402-1505)

   25|Active     |    1|org.eclipse.equinox.preferences (3.5.100.v20130422-1538)

   26|Active     |    1|org.eclipse.equinox.registry (3.5.301.v20130717-1549)

   27|Active     |    1|org.eclipse.ocl (3.3.0.v20130909-1552)

   28|Active     |    1|org.eclipse.ocl.common (1.1.0.v20130531-0544)

   29|Active     |    1|org.eclipse.ocl.ecore (3.3.0.v20130520-1222)

   30|Active     |    1| (3.3.100.v20130513-1956)

   31|Active     |    1|org.eclipse.xtext.xbase.lib (2.4.3.v201309030823)

   32|Active     |    1|org.eclipselabs.emongo.api (

   33|Active     |    1|org.eclipselabs.emongo.components (

   34|Resolved   |    1|org.eclipselabs.emongo.configurator (

   35|Active     |    1|org.mongodb.mongo-java-driver (2.11.1.RELEASE)

   36|Active     |    1|org.openhealthtools.mdht.emf.runtime (

   37|Active     |    1|org.openhealthtools.mdht.uml.cda (

   38|Active     |    1|org.openhealthtools.mdht.uml.hl7.datatypes (

   39|Active     |    1|org.openhealthtools.mdht.uml.hl7.rim (

   40|Active     |    1|org.openhealthtools.mdht.uml.hl7.vocab (

   41|Active     |    1|org.ops4j.pax.logging.pax-logging-api (1.3.0)

   42|Active     |    1|org.ops4j.pax.logging.pax-logging-service (1.3.0)

   43|Active     |    1|slf4j.api (1.6.2)

   44|Active     |    1|org.eclipselabs.emodeling.api (

   45|Active     |    1| (

   46|Active     |    1| (

   47|Active     |    1| (

   48|Active     |    1| (

   49|Active     |    1| (

   50|Active     |    1|org.eclipselabs.mongoemf.converter (

   51|Active     |    1|org.eclipselabs.mongoemf.converter.source (

   52|Active     |    1|org.eclipselabs.mongoemf.core (

   53|Active     |    1|org.eclipselabs.mongoemf.core.source (

   54|Active     |    1|org.eclipselabs.mongoemf.handlers (

   55|Active     |    1|org.eclipselabs.mongoemf.handlers.source (

   56|Active     |    1|org.eclipselabs.mongoemf.query.mongodb (

   57|Active     |    1|org.eclipselabs.mongoemf.query.mongodb.source (

   58|Active     |    1|org.eclipselabs.mongoemf.streams (

   59|Active     |    1|org.eclipselabs.mongoemf.streams.source (

   60|Active     |    1|org.eclipselabs.emodeling.components (

   61|Active     |    1|org.eclipselabs.emodeling.query (

   62|Active     |    1| (

   63|Active     |    1| (

Bryan Hunt

Nov 6, 2013, 12:17:28 PM11/6/13
Hi Geoffry,

On inspection, I do see one problem with your list of bundles.  You are including both and - you should choose one or the other.  This will; however, not fix your problem.  Could you temporarily switch from the felix.scr to equinox.ds so that we can use the "ls" command?  That would make debugging much easier.

I intend to create a working example using bndtools, but I'm currently busy and sick - very bad combination.


Geoffry Roberts

Nov 6, 2013, 3:18:37 PM11/6/13

I removed felix.scr and added equinox.ds and its dependencies--all are active, but then no "ls" command.  I added equinox.console all the familiar equinox commands like "ss" are now working but "help" only shows the, which is like the unix ls; not what we want.   


I am running from the bndtools RunOSGi link with org.eclipse.osgi;version='[3.9.1.v20130814-1242,3.9.1.v20130814-1242]' selected.  It might be I need another bundle I've been googling but nothing much comes up.

Bryan Hunt

Nov 6, 2013, 7:33:12 PM11/6/13
Hi Geoffry,

I have just pushed a working example based on Bndtools and Equinox to master.  Have a look in examples/bnd for the cnf and example project.  The example project contains an example.bndrun.

Reply all
Reply to author
0 new messages