Stardog 5.0.2 different results with terminal than java sesame for property paths

Hi,

I’m getting wrong (too many) results for property path queries run through Sesame.

Here is the query:

CONSTRUCT {
	?id 
			arkiv:arkivskaper ?arkivskaper;
			arkiv:arkivskaperTransitive  ?arkivskaperTransitive .
} WHERE {
 {
		VALUES (?id) {(<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00>)}
		?id arkiv:arkivskaper ?arkivskaper
	} UNION {
		VALUES (?id) {(<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00>)}
		?id arkiv:arkivskaper ?arkivskaper.
		?arkivskaper virksomhet:parent+ ?arkivskaperTransitive.
	} 

}

Results from Java Sesame:

(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper, http://data.oslo.kommune.no/virksomhet/874778842)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper, http://data.oslo.kommune.no/virksomhet/974778807)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper, http://data.oslo.kommune.no/virksomhet/874778842)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/osloKommune)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/testvirksomhet)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/toppnodeStat)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/oepeksport_content_provider_159)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/oepeksport_content_provider_117)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/oepeksport_content_provider_112)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/874778842)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/974778807)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/976819853)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/976819837)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/974778874)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/toppnodeKommune)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper, http://data.oslo.kommune.no/virksomhet/974778807)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/osloKommune)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/testvirksomhet)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/toppnodeStat)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/oepeksport_content_provider_159)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/oepeksport_content_provider_117)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/oepeksport_content_provider_112)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/874778842)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/974778807)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/976819853)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/976819837)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.oslo.kommune.no/virksomhet/974778874)
(http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00, http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive, http://data.einnsyn.no/virksomhet/toppnodeKommune)

Results from terminal

@prefix : <http://api.stardog.com/> .
@prefix arkiv: <http://www.arkivverket.no/standarder/noark5/arkivstruktur/> .
@prefix bruker: <http://data.einnsyn.no/brukermeta/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix stardog: <tag:stardog:api:> .
@prefix virksomhet: <http://data.einnsyn.no/virksomhetmeta/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00> arkiv:arkivskaper <http://data.oslo.kommune.no/virksomhet/874778842> , <http://data.oslo.kommune.no/virksomhet/974778807> , <http://data.oslo.kommune.no/virksomhet/874778842> ;
        arkiv:arkivskaperTransitive <http://data.oslo.kommune.no/virksomhet/osloKommune> , <http://data.einnsyn.no/virksomhet/toppnodeKommune> ;
        arkiv:arkivskaper <http://data.oslo.kommune.no/virksomhet/974778807> ;
        arkiv:arkivskaperTransitive <http://data.oslo.kommune.no/virksomhet/osloKommune> , <http://data.einnsyn.no/virksomhet/toppnodeKommune> .

Query plan Java Sesame

From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_130>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_131>
From <http://data.oslo.kommune.no/virksomhet/972408875>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_138>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_139>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_136>
From <http://data.oslo.kommune.no/virksomhet/971179686>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_137>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_134>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_135>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_132>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_133>
From <http://data.einnsyn.no/politiskpartiGraph>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_141>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_142>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_140>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_149>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_147>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_148>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_145>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_146>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_143>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_144>
From <http://data.oslo.kommune.no/virksomhet/osloKommune>
From <http://data.oslo.kommune.no/virksomhet/974778726>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_196>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_197>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_194>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_195>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_192>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_193>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_190>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_191>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_116>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_117>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_114>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_115>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_90>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_112>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_113>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_110>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_198>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_111>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_199>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_84>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_85>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_86>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_87>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_80>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_81>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_118>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_82>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_83>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_119>
From <http://data.oslo.kommune.no/virksomhet/976819853>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_88>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_89>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_120>
From <http://data.oslo.kommune.no/virksomhet/870534612>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_127>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_128>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_125>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_126>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_123>
From <http://data.einnsyn.no/osloKommuneVirksomheterGraph>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_124>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_121>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_122>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_95>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_96>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_91>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_92>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_129>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_93>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_94>
From <http://data.oslo.kommune.no/virksomhet/970534679>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_174>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_175>
From <http://data.oslo.kommune.no/virksomhet/874778842>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_172>
From <http://data.oslo.kommune.no/virksomhet/974778866>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_173>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_171>
From <http://data.oslo.kommune.no/virksomhet/974778742>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_215>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_213>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_214>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_178>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_179>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_176>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_177>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_210>
From <http://data.oslo.kommune.no/virksomhet/976819837>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_185>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_186>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_183>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_184>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_181>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_182>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_180>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_105>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_106>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_103>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_104>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_189>
From <http://data.einnsyn.no/virksomhet/testvirksomhet>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_101>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_102>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_187>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_100>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_188>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_109>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_107>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_108>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_77>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_78>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_79>
From <http://data.einnsyn.no/virksomheterGraph>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_152>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_153>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_150>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_151>
From <http://data.oslo.kommune.no/virksomhet/874778702>
From <http://data.oslo.kommune.no/virksomhet/970145311>
From <http://data.oslo.kommune.no/virksomhet/974778882>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_158>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_159>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_156>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_157>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_154>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_155>
From <http://data.oslo.kommune.no/virksomhet/970534644>
From <http://data.oslo.kommune.no/virksomhet/974778807>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_163>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_164>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_162>
From <http://data.oslo.kommune.no/virksomhet/971022051>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_160>
From <http://data.oslo.kommune.no/virksomhet/974778874>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_204>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_205>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_169>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_202>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_203>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_167>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_168>
From default
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_165>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_166>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_208>
From <http://www.arkivverket.no/standarder/noark5/arkivstruktur/ontologyGraph>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_209>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_206>
From <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_207>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_130>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_131>
From Named <http://data.oslo.kommune.no/virksomhet/972408875>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_138>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_139>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_136>
From Named <http://data.oslo.kommune.no/virksomhet/971179686>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_137>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_134>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_135>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_132>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_133>
From Named <http://data.einnsyn.no/politiskpartiGraph>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_141>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_142>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_140>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_149>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_147>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_148>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_145>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_146>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_143>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_144>
From Named <http://data.oslo.kommune.no/virksomhet/osloKommune>
From Named <http://data.oslo.kommune.no/virksomhet/974778726>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_196>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_197>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_194>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_195>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_192>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_193>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_190>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_191>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_116>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_117>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_114>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_115>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_90>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_112>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_113>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_110>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_198>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_111>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_199>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_84>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_85>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_86>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_87>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_80>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_81>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_118>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_82>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_83>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_119>
From Named <http://data.oslo.kommune.no/virksomhet/976819853>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_88>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_89>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_120>
From Named <http://data.oslo.kommune.no/virksomhet/870534612>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_127>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_128>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_125>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_126>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_123>
From Named <http://data.einnsyn.no/osloKommuneVirksomheterGraph>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_124>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_121>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_122>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_95>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_96>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_91>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_92>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_129>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_93>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_94>
From Named <http://data.oslo.kommune.no/virksomhet/970534679>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_174>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_175>
From Named <http://data.oslo.kommune.no/virksomhet/874778842>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_172>
From Named <http://data.oslo.kommune.no/virksomhet/974778866>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_173>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_171>
From Named <http://data.oslo.kommune.no/virksomhet/974778742>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_215>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_213>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_214>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_178>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_179>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_176>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_177>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_210>
From Named <http://data.oslo.kommune.no/virksomhet/976819837>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_185>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_186>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_183>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_184>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_181>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_182>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_180>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_105>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_106>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_103>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_104>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_189>
From Named <http://data.einnsyn.no/virksomhet/testvirksomhet>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_101>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_102>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_187>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_100>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_188>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_109>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_107>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_108>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_77>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_78>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_79>
From Named <http://data.einnsyn.no/virksomheterGraph>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_152>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_153>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_150>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_151>
From Named <http://data.oslo.kommune.no/virksomhet/874778702>
From Named <http://data.oslo.kommune.no/virksomhet/970145311>
From Named <http://data.oslo.kommune.no/virksomhet/974778882>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_158>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_159>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_156>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_157>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_154>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_155>
From Named <http://data.oslo.kommune.no/virksomhet/970534644>
From Named <http://data.oslo.kommune.no/virksomhet/974778807>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_163>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_164>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_162>
From Named <http://data.oslo.kommune.no/virksomhet/971022051>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_160>
From Named <http://data.oslo.kommune.no/virksomhet/974778874>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_204>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_205>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_169>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_202>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_203>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_167>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_168>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_165>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_166>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_208>
From Named <http://www.arkivverket.no/standarder/noark5/arkivstruktur/ontologyGraph>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_209>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_206>
From Named <http://data.einnsyn.no/virksomhet/oepeksport_content_provider_207>
Reduced [#379]
`��� Projection(?id AS ?subject, ?rmazrcql AS ?predicate, ?arkivskaper AS ?object;
`�   +���         ?id AS ?subject, ?qytrnaay AS ?predicate, ?arkivskaperTransitive AS ?object) [#379]
`�       `��� Bind(<http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper> AS ?rmazrcql) (<http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive> AS ?qytrnaay) [#379]
`�       `�   `��� Union [#379]
`�       `�   `�   +��� Bind(<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00> AS ?id) [#2]
`�       `�   `�   +����  `��� Scan[SPO](<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00>, <http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper>, ?arkivskaper) [#2]
`�       `�   `�   +��   `��� Bind(<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00> AS ?id) [#377]
`�       `�   `�   +��   `�   `��� MergeJoin(?arkivskaper) [#377]
`�       `�   `�   +��   `�   `�   +��� Scan[SPOC](<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00>, <http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper>, ?arkivskaper) [#2]
`�       `�   `�   +��   `�   `�     `��� PropertyPath(?arkivskaper -> ?arkivskaperTransitive, minLength=1, sorted by=?arkivskaper) [#754]
`�       `�   `�   +��   `�   `�     `�   `��� Scan[PSOC](?arkivskaper, <http://data.einnsyn.no/virksomhetmeta/parent>, ?arkivskaperTransitive) [#377]

Btw. This looks like more UTF-8 problems :stuck_out_tongue:

And query plan from terminal:

The Query Plan:

From all
Reduced [#379]
`��� Projection(?id AS ?subject, ?qgvwqfof AS ?predicate, ?arkivskaper AS ?object;
`�   +���         ?id AS ?subject, ?qwcrfxse AS ?predicate, ?arkivskaperTransitive AS ?object) [#379]
`�       `��� Bind(<http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper> AS ?qgvwqfof) (<http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaperTransitive> AS ?qwcrfxse) [#379]
`�       `�   `��� Union [#379]
`�       `�   `�   +��� Bind(<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00> AS ?id) [#2]
`�       `�   `�   +����  `��� Scan[SPOC](<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00>, <http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper>, ?arkivskaper) [#2]
`�       `�   `�   +��   `��� Bind(<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00> AS ?id) [#377]
`�       `�   `�   +��   `�   `��� MergeJoin(?arkivskaper) [#377]
`�       `�   `�   +��   `�   `�   +��� Scan[SPOC](<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00>, <http://www.arkivverket.no/standarder/noark5/arkivstruktur/arkivskaper>, ?arkivskaper) [#2]
`�       `�   `�   +��   `�   `�     `��� PropertyPath(?arkivskaper -> ?arkivskaperTransitive, minLength=1, sorted by=?arkivskaper) [#754]
`�       `�   `�   +��   `�   `�     `�   `��� Scan[PSOC](?arkivskaper, <http://data.einnsyn.no/virksomhetmeta/parent>, ?arkivskaperTransitive) [#377]

Seems like the only difference is that Java Sesame is using a lot of named graphs, which stem from the named graph security.

I’ve tried adding all those named graphs to the query and running it from the terminal, and now it gives the same (wrong) result as sesame.

This looks like a bug to me.

Cheers,
Håvard M. Ottestad

And after a bit more experimenting, this is the minimal query that produces the unsound results:

select distinct *

From <http://data.oslo.kommune.no/virksomhet/874778842>
From <http://data.einnsyn.no/virksomheterGraph>
From <http://www.arkivverket.no/standarder/noark5/arkivstruktur/ontologyGraph>


 WHERE {

		<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00> arkiv:arkivskaper / virksomhet:parent* ?arkivskaperTransitive.
	

}

Note that the three graphs are (in order):

  • Data graph for company (Norwegian: virksomhet) with id 874778842
  • Meta data graph with info about all companies
  • Ontology graph

Hi Håvard,

Can we get a sample of your data (privately, possibly obfuscated) to reproduce this?

Thanks,
Pavel

PS. The fix for the UTF-8 problems will be in the next release.

Hi Pavel,

Thanks for the quick reply.

I’ve emailed you an obfuscated dump that reproduces the issue.

Try with the following queries:

select distinct *

From <http://data.oslo.kommune.no/virksomhet/874778842>
From <http://data.einnsyn.no/virksomheterGraph>
From <http://www.arkivverket.no/standarder/noark5/arkivstruktur/ontologyGraph>


 WHERE {

		<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00> arkiv:arkivskaper / virksomhet:parent* ?arkivskaperTransitive.
	

}

AND

select distinct *

 WHERE {

		<http://example.com/base/saksmappe--SM-2-15/01093--2--2015-12-08T00%3A00%3A00.000%2B01%3A00> arkiv:arkivskaper / virksomhet:parent* ?arkivskaperTransitive.
	
}

This is the script I used to create my database:

./stardog-admin db create -n testSesame \
    -o security.named.graphs=true  \
    icv.enabled=true \
    icv.reasoning.enabled=true \
    icv.active.graphs=http://data.einnsyn.no/osloKommuneVirksomheterGraph,http://data.einnsyn.no/virksomheterGraph,http://data.einnsyn.no/brukereGraph,http://data.einnsyn.no/innsynskravGraph,http://www.arkivverket.no/standarder/noark5/arkivstruktur/ontologyGraph   \
    preserve.bnode.ids=true \
    query.all.graphs=true \
    reasoning.type=SL \
    reasoning.schema.graphs=http://www.arkivverket.no/standarder/noark5/arkivstruktur/ontologyGraph \
    --

Thanks, I can reproduce the issue. The fix should be available in the next release (early Sep). I’ll report here if there’s a workaround before then.

Cheers,
Pavel

Thank you for your patience Pavel. Looking forward to a fix :slight_smile:

OK, the bug is easy to resolve and the next release will include a fix. For now you can add -Dcom.complexible.stardog.plan.eval.optimized-property-paths=false to your STARDOG_JAVA_ARGS (or directly to the stardog-admin script), which should also help to avoid the problem at some performance cost.

Cheers,
Pavel

Hi @pavel ,

I just upgraded from 5.0.2 to 5.0.4 since this is the build where we can disable property path context checks.

It seems that this bug is present in 5.0.4, and adding -Dcom.complexible.stardog.plan.eval.optimized-property-paths=false doesn’t seem to help.

I haven’t tested on 5.0.3, so I don’t know if that build fixed the issue or not.

Would you mind checking if 5.0.4 is working for you with the test data i sent initially? If it works for you I’ll have to make you a working example.

Håvard

Hi Håvard,

I actually ran your query on the provided data sample before we released 5.0.4. The query without FROM clauses but with query.all.graphs=true returned 2 results, but the query with the 3 FROMclauses returned just one of those. That seemed correct to me (but maybe I forgot something in the meantime),

It’s possible that the sample is no longer sufficient to show the bug that manifests on the entire database. In that case we’d need more data.

I’m on vacation this and next week but someone else can pick it up.

Cheers,
Pavel

PS. That internal system property won’t work any more. But see query.pp.contexts server/database property in the docs.

@stephen pinging you on this issue since Pavel is still on vacation.

tldr: queries with multiple FROM and FROM NAMED return more results than the same query run against the all graphs graph.

I have uploaded new data and queries to: https://github.com/hmottestad/sparqlPathAndGraphIssue

PS. Tested in 5.0.4

Hi,

Thanks for the reproducible test case. I too am able to see these results in 5.0.4 and will be making a ticket to investigate and fix this issue.

Thats good to know. Thank you.

Håvard