Still Working on the Protocol Problem

49 views
Skip to first unread message

Geoffry Roberts

unread,
Nov 4, 2013, 4:22:06 PM11/4/13
to mong...@googlegroups.com
Brian,

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?

Thanks

Bryan Hunt

unread,
Nov 4, 2013, 4:37:28 PM11/4/13
to mong...@googlegroups.com
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 org.eclipselabs.mongoemf.builders.factory org.eclipselabs.mongoemf.builders(bid=1)
2 Active org.eclipselabs.mongoemf.handlers.mongoURIHandlerProvider org.eclipselabs.mongoemf.handlers(bid=8)
3 Active org.eclipselabs.emodeling.rs.handler org.eclipselabs.emodeling.rs.handler(bid=9)
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.id.metatype org.eclipselabs.emongo.components(bid=34)
14 Active org.eclipselabs.mongoemf.converter org.eclipselabs.mongoemf.converter(bid=38)
15 Active org.eclipselabs.emodeling.rs.basic.factory org.eclipselabs.emodeling.rs.basic(bid=42)


Bryan

--
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/groups/opt_out.

Message has been deleted

Geoffry Roberts

unread,
Nov 5, 2013, 1:30:02 PM11/5/13
to mong...@googlegroups.com
Brian,

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(AbstractEList.java:95) ~[na:na]

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

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

at org.eclipselabs.emodeling.rs.handler.ResourceSetUriHandlerConfiguratorComponent.configureResourceSet(ResourceSetUriHandlerConfiguratorComponent.java:50) ~[na:na]

at org.eclipselabs.emodeling.rs.mongo.MongoResourceSetFactoryComponent.createResourceSet(MongoResourceSetFactoryComponent.java:40) ~[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.

uriConverter=org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl@396c9ff4

uriHandlers=[org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl@a7969a0, 

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

unread,
Nov 5, 2013, 1:59:12 PM11/5/13
to mong...@googlegroups.com
Hi Geoffry,

Looking at the code in ResourceSetUriHandlerConfiguratorComponent.java:50 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?

Bryan

Geoffry Roberts

unread,
Nov 6, 2013, 11:52:14 AM11/6/13
to mong...@googlegroups.com
Brian,

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 - rsc=org.eclipselabs.emodeling.rs.handler.ResourceSetUriHandlerConfiguratorComponent@3b5ab69d


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

START LEVEL 1

   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|com.google.guava (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|lpg.runtime.java (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|org.apache.felix.gogo.shell (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|org.eclipse.core.jobs (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|org.eclipse.equinox.app (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|org.eclipse.osgi.services (3.3.100.v20130513-1956)

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

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

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

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

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

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

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

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

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

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

   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 (1.0.0.201311041009)

   45|Active     |    1|org.eclipselabs.emodeling.rs.mongo (1.0.0.201311041009)

   46|Active     |    1|org.eclipselabs.emodeling.rs.handler (1.0.0.201311051026)

   47|Active     |    1|org.eclipselabs.emodeling.rs.basic (1.0.0.201311041009)

   48|Active     |    1|org.eclipselabs.mongoemf.builders (0.8.0.201311041506)

   49|Active     |    1|org.eclipselabs.mongoemf.builders.source (0.8.0.201311041506)

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

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

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

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

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

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

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

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

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

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

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

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

   62|Active     |    1|org.eclipselabs.emodeling.rs.mapping (1.0.0.201311041009)

   63|Active     |    1|org.eclipselabs.emodeling.rs.cache (1.0.0.201311041009)

Bryan Hunt

unread,
Nov 6, 2013, 12:17:28 PM11/6/13
to mong...@googlegroups.com
Hi Geoffry,

On inspection, I do see one problem with your list of bundles.  You are including both emodeling.rs.basic and emodeling.rs.mongo - 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.

Bryan

Geoffry Roberts

unread,
Nov 6, 2013, 3:18:37 PM11/6/13
to mong...@googlegroups.com
Brian,

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 felix.ls, which is like the unix ls; not what we want.   

btw 

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

unread,
Nov 6, 2013, 7:33:12 PM11/6/13
to mong...@googlegroups.com
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.

Bryan
Reply all
Reply to author
Forward
0 new messages