ncbo / goo

Graph Oriented Objects (GOO) for Ruby. A RDF/SPARQL based ORM.
http://ncbo.github.io/goo/
Other
15 stars 6 forks source link

Mapping query failure in AllegroGraph 7+ #109

Closed mdorf closed 2 years ago

mdorf commented 3 years ago

The mappings REST service fails with Allegrograph versions 7.0.2 and 7.1.0. This was tested on a Virtual Appliance with a single ontology in place, STY.

http://localhost:8080/ontologies/STY/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSTY%2FT021/mappings

The error is due to the SPARQL query below returning this error:

Executing query failed:
Funcall of nil which is a non-function.

The query:

SELECT DISTINCT ?s2 ?g ?source ?o
WHERE {
    {
        GRAPH <http://data.bioontology.org/ontologies/STY/submissions/1> {
          <http://purl.bioontology.org/ontology/STY/T021> <http://bioportal.bioontology.org/ontologies/umls/cui> ?o .
        }
        GRAPH ?g {
          ?s2 <http://bioportal.bioontology.org/ontologies/umls/cui> ?o .
        }
        BIND ('CUI' AS ?source)
    }

    UNION
    {
        GRAPH <http://data.bioontology.org/ontologies/STY/submissions/1> {
          <http://purl.bioontology.org/ontology/STY/T021> <http://data.bioontology.org/metadata/def/mappingSameURI> ?o .
        }
        GRAPH ?g {
          ?s2 <http://data.bioontology.org/metadata/def/mappingSameURI> ?o .
        }
        BIND ('SAME_URI' AS ?source)
    }

    UNION
    {
        GRAPH <http://data.bioontology.org/ontologies/STY/submissions/1> {
          <http://purl.bioontology.org/ontology/STY/T021> <http://data.bioontology.org/metadata/def/mappingLoom> ?o .
        }
        GRAPH ?g {
          ?s2 <http://data.bioontology.org/metadata/def/mappingLoom> ?o .
        }
        BIND ('LOOM' AS ?source)
    }

    UNION
    {
        GRAPH <http://data.bioontology.org/ontologies/STY/submissions/1> {
          <http://purl.bioontology.org/ontology/STY/T021> <http://data.bioontology.org/metadata/def/mappingRest> ?o .
        }
        GRAPH ?g {
          ?s2 <http://data.bioontology.org/metadata/def/mappingRest> ?o .
        }
        BIND ('REST' AS ?source)
    }
    FILTER (!STRSTARTS(str(?g),'http://data.bioontology.org/ontologies/STY'))
}

Contacted AllegroGraph support, opened a ticket: spr45248.

mdorf commented 3 years ago

From AllegroGraph support:

Thanks a lot for reporting this issue! I was able to reproduce the problem which turned out to be a well hidden bug. The fix will be available in AG 7.0.4 patch release, but we can send you a link to the nightly 7.0.4 build as soon as the fix is merged.

mdorf commented 3 years ago

We've deployed the official AG 7.0.4 build to the OntoPortal Virtual Appliance. Currently testing to make sure this issue has been addressed.