Closed eroux closed 4 years ago
The short story first: the exception is comming from a null key in the results Map originating from blank nodes in the model returned by the query. As far as website hanging is concerned, I cannot say anything helpful for now.
Here is the corresponding query:
CONSTRUCT
{
?res tmp:status ?st .
?res tmp:matchScore ?sc .
?res tmp:nameMatch ?nameMatch .
?res tmp:noteMatch ?noteMatch .
?res tmp:isMain true .
?res tmp:isCreator ?isCreator .
?res ?resp ?reso .
?res tmp:yearStart ?yearStart .
?res tmp:provider ?provider .
?res tmp:originalRecord ?originalRecord .
?evt ?evtp ?evto .
?name ?namep ?nameo .
}
WHERE
{ { { ( ?name ?sc ?nameMatch )
text:query ( rdfs:label "\"bdud 'dul rdo rje\""@bo-x-ewts 1000 "highlight:" ) .
?res :personName ?name .
?name ?namep ?nameo
}
UNION
{ ( ?res ?sc ?nameMatch )
text:query ( :skosLabels "\"bdud 'dul rdo rje\""@bo-x-ewts 1000 "highlight:" ) .
?res rdf:type :Person
}
UNION
{ ( ?note ?sc ?noteMatch )
text:query ( :noteText "\"bdud 'dul rdo rje\""@bo-x-ewts 1000 "highlight:" ) .
?res :note ?note ;
rdf:type :Person
}
VALUES ?resp { skos:altLabel skos:prefLabel skos:placeEvent :personGender :personName :personEvent owl:sameAs rdfs:seeAlso tmp:entityScore }
?res ?resp ?reso .
?resAdm adm:adminAbout ?res ;
adm:status ?st .
?resAdm adm:metadataLegal/adm:provider ?provider
BIND(EXISTS { ?tmp :agent ?res } AS ?isCreator)
}
UNION
{ { ( ?name ?sc ?nameMatch )
text:query ( rdfs:label "\"bdud 'dul rdo rje\""@bo-x-ewts 1000 "highlight:" ) .
?res :personName ?name .
?name ?namep ?nameo
}
UNION
{ ( ?res ?sc ?nameMatch )
text:query ( :skosLabels "\"bdud 'dul rdo rje\""@bo-x-ewts 1000 "highlight:" ) .
?res rdf:type :Person
}
UNION
{ ( ?note ?sc ?noteMatch )
text:query ( :noteText "\"bdud 'dul rdo rje\""@bo-x-ewts 1000 "highlight:" ) .
?res :note ?note ;
rdf:type :Person
}
?res :personEvent ?evt .
?evt rdf:type ?evtType
FILTER ( ?evtType IN (:PersonBirth, :PersonDeath) )
?evt ?evtp ?evto
BIND(if(( ( ?evtType = :PersonBirth ) && ( ( ?evtp = :onYear ) || ( ?evtp = :notBefore ) ) ), ?evto, ( 1 / 0 )) AS ?yearStart)
}
}
part of the result contains:
bdr:NM19FFE080FD47C116 , bdr:NM10E87BDDB7E5BBC8 ;
tmp:entityScore 7 ;
tmp:isCreator true ;
tmp:isMain true ;
tmp:matchScore "17.712336"^^xsd:float , "17.133064"^^xsd:float , "15.571538"^^xsd:float , "13.698758"^^xsd:float ;
tmp:nameMatch "rig 'dzin ↦bdud 'dul rdo rje↤/"@bo-x-ewts , "↦bdud 'dul rdo rje↤/"@bo-x-ewts , "mag sar paN+Di ta 03 ↦bdud 'dul rdo rje↤/"@bo-x-ewts ;
tmp:provider bda:CP021 ;
tmp:status bda:StatusReleased ;
tmp:yearStart "1840"^^xsd:gYear ;
owl:sameAs <http://api.treasuryoflives.org/resource/TOLP10664> ;
skos:prefLabel "bdud 'dul rdo rje/"@bo-x-ewts .
[ a bdo:PersonOtherName ;
rdfs:label "skal bzang pad+ma dbang rgyal bdud 'dul rdo rje"@bo-x-ewts , "skal bzang pad+ma dbang rgyal"@bo-x-ewts , "rdo rje brag rig 'dzin 08 skal bzang pad+ma dbang rgyal"@bo-x-ewts , "སྐལ་བཟང་པདྨ་དབང་རྒྱལ།"@bo , "The Eighth Dorje Drak Rigdzin, Kelzang Pema Wanggyel" , "Kelzang Pema Wanggyel Dudul Dorje"
]
which leads to blank node processing in Type results (these are the one I found):
SUBJECT URI STATEMENt >>[aed3c5eb577a11c71463d32d1bcbbd24, http://www.w3.org/2000/01/rdf-schema#label, "Kelzang Pema Wanggyel Dudul Dorje"]
SUBJECT URI >>null
SUBJECT URI STATEMENt >>[aed3c5eb577a11c71463d32d1bcbbd24, http://www.w3.org/2000/01/rdf-schema#label, "The Eighth Dorje Drak Rigdzin, Kelzang Pema Wanggyel"]
SUBJECT URI >>null
SUBJECT URI STATEMENt >>[aed3c5eb577a11c71463d32d1bcbbd24, http://www.w3.org/2000/01/rdf-schema#label, "སྐལ་བཟང་པདྨ་དབང་རྒྱལ།"@bo]
SUBJECT URI >>null
SUBJECT URI STATEMENt >>[aed3c5eb577a11c71463d32d1bcbbd24, http://www.w3.org/2000/01/rdf-schema#label, "rdo rje brag rig 'dzin 08 skal bzang pad+ma dbang rgyal"@bo-x-ewts]
SUBJECT URI >>null
SUBJECT URI STATEMENt >>[aed3c5eb577a11c71463d32d1bcbbd24, http://www.w3.org/2000/01/rdf-schema#label, "skal bzang pad+ma dbang rgyal"@bo-x-ewts]
SUBJECT URI >>null
SUBJECT URI STATEMENt >>[aed3c5eb577a11c71463d32d1bcbbd24, http://www.w3.org/2000/01/rdf-schema#label, "skal bzang pad+ma dbang rgyal bdud 'dul rdo rje"@bo-x-ewts]
SUBJECT URI >>null
SUBJECT URI STATEMENt >>[aed3c5eb577a11c71463d32d1bcbbd24, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://purl.bdrc.io/ontology/core/PersonOtherName]
SUBJECT URI >>null
so it leads to a null key in the aux HashMap, here: https://github.com/buda-base/lds-pdi/blob/master/src/main/java/io/bdrc/ldspdi/results/library/TypeResults.java#L53
and the HashMap looks like this (with a null key at the very beginning):
RES >>{aux={null=[{xml:lang=, type=http://www.w3.org/2000/01/rdf-schema#label, value=Kelzang Pema Wanggyel Dudul Dorje}, {xml:lang=, type=http://www.w3.org/2000/01/rdf-schema#label, value=The Eighth Dorje Drak Rigdzin, Kelzang Pema Wanggyel}, {xml:lang=bo, type=http://www.w3.org/2000/01/rdf-schema#label, value=སྐལ་བཟང་པདྨ་དབང་རྒྱལ།}, {xml:lang=bo-x-ewts, type=http://www.w3.org/2000/01/rdf-schema#label, value=rdo rje brag rig 'dzin 08 skal bzang pad+ma dbang rgyal}, {xml:lang=bo-x-ewts, type=http://www.w3.org/2000/01/rdf-schema#label, value=skal bzang pad+ma dbang rgyal}, {xml:lang=bo-x-ewts, type=http://www.w3.org/2000/01/rdf-schema#label, value=skal bzang pad+ma dbang rgyal bdud 'dul rdo rje}, {type=http://www.w3.org/1999/02/22-rdf-syntax-ns#type, value=http://purl.bdrc.io/ontology/core/PersonOtherName}, {type=http://www.w3.org/1999/02/22-rdf-syntax-ns#type, value=http://purl.bdrc.io/ontology/core/PersonDeath}, {xml:lang=, type=http://purl.bdrc.io/ontology/core/onYear, value=1880}, {type=http://www.w3.org/1999/02/22-rdf-syntax-ns#type, value=http://purl.bdrc.io/ontology/core/PersonBirth}, {xml:lang=, type=http://purl.bdrc.io/ontology/core/onYear, value=1848}, {type=http://www.w3.org/1999/02/22-rdf-syntax-ns#type, value=http://purl.bdrc.io/ontology/core/PersonDeath}, {xml:lang=, type=http://purl.bdrc.io/ontology/core/onYear, value=1797}, {xml:lang=bo-x-ewts, type=http://www.w3.org/2000/01/rdf-schema#label, value=bdud 'dul rdo rje}, {xml:lang=, type=http://www.w3.org/2000/01/rdf-schema#label, value=The Thirteenth Karmapa, Dudul Dorje},
ETC...
thanks! fixed it
This page gives the erroneous output:
which makes the site hang, and this error appears in the
ldspdi.log
file: