[Mulgara-dev] Mulgara unexpected results

Agustina Martinez amgcia at gmail.com
Mon Dec 10 08:48:13 UTC 2012


No worries Paul. Weekends are weekends! :)

Would you like me to send you the test data that generates errors on the
queries? I can attach it in RDF format.

Agusina

2012/12/10 Paul Gearon <gearon at ieee.org>

> Hi Agustina,
>
> Sorry I couldn't respond before now. Family commitments on the weekends...
>
> I can see that you have several numeric values in that query, but can't
> see why it would try using a Bool for any of them. I can't right now, but
> I'll try it in a debugger tomorrow morning to see what's triggering it.
>
> As for the transaction error... that really bothers me. Read operations
> like this shouldn't lead to that kind of error. I'll try it myself, but I
> may need some decent test data to work with.
>
> Paul
>
>
> On Sat, Dec 8, 2012 at 4:41 AM, Agustina Martinez <amgcia at gmail.com>wrote:
>
>> Hello Paul,
>>
>> Thanks for the quick response,
>>
>> I have checked and, yes I have been using 2.1.13, not 2.1.12.
>>
>> There are two queries that are failing. The first one below reports the
>> error I sent you about boolean:
>>
>> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
>> PREFIX dc: <http://purl.org/dc/elements/1.1/>
>> PREFIX rel: <info:fedora/fedora-system:def/relations-external#>
>> PREFIX dcmitype: <http://purl.org/dc/dcmitype/>
>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>> PREFIX ddi2: <http://example.org/ddi2/>
>> PREFIX qudex: <http://example.org/qudex/>
>> PREFIX ex: <http://example.org/>
>> PREFIX fn: <http://www.w3.org/2005/xpath-functions/#>
>> PREFIX fview: <info:fedora/fedora-system:def/view#>
>> PREFIX smf: <http://www.topquadrant.com/sparqlmotion/smf.html#smf:>
>>
>> SELECT DISTINCT ?id ?label ?format ?lang ?subj ?cov ?dc_type ?creator
>> ?date ?lat ?loc ?label_code ?labelCategory ?label_memo ?is_original ?type
>> ?relation ?source_ref ?hasAnnotation ?category
>> FROM <rmi://localhost/fedora#ri>
>> WHERE {
>> ?file a ?rtype;
>> dc:identifier ?id;
>>  dc:title ?label;
>> dc:format ?format;
>> dc:creator ?creator;
>>  rel:isPartOf <info:fedora/qudex:1083>.
>> optional{?file fview:disseminates ?sref.}
>>  optional {?file rel:isPartOf ?col1.}
>> optional {?file dc:language ?lang.}
>> optional {?file dc:subject ?subj.}
>>  optional {?file dc:coverage ?cov.}
>> optional {?file dc:type ?dc_type.}
>> optional {?file dc:date ?date.}
>>
>> optional {?file geo:lat_long ?lat.}
>> optional {?file geo:location ?loc.}
>>  optional {?file qudex:labelCode ?label_code.}
>> optional {?file qudex:labelCategory ?label_cat.}
>>  optional {?file qudex:category ?category.}
>> optional {?file qudex:labelMemo ?label_memo.}
>>  optional {?file qudex:isOriginal ?is_original.}
>> optional {?file rel:hasAnnotation ?annotation.}
>>  FILTER ((?rtype = ex:File) && regex(str(?id), '.*qudex.*') &&
>> regex(str(?sref), '.*sourceReference.*', 'i'))
>>  LET (?type := fn:substring(str(?rtype),
>> smf:lastIndexOf(str(?rtype),'/') + 2)).
>>     LET (?relation := fn:substring(str(?col1),
>> smf:lastIndexOf(str(?col1),'/') + 2)).
>>     LET (?hasAnnotation := fn:substring(str(?annotation),
>> smf:lastIndexOf(str(?annotation),'/') + 2)).
>>     LET (?source_ref := fn:concat('http://myserver/fedora/objects/',
>> fn:concat(str(?id), '/datastreams/sourceReference/content'))).
>>     LET (?labelCategory := fn:substring(?label_cat,
>> smf:lastIndexOf(?label_cat,':') +2)).
>> }
>>
>> This second query produces a 500 server error: transaction error:
>>
>>  PREFIX dc: <http://purl.org/dc/elements/1.1/>
>> PREFIX rel: <info:fedora/fedora-system:def/relations-external#>
>> PREFIX dcmitype: <http://purl.org/dc/dcmitype/>
>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>> PREFIX ddi2: <http://example.org/ddi2/>
>> PREFIX qudex: <http://example.org/qudex/>
>> PREFIX ex: <http://example.org/>
>> PREFIX fn: <http://www.w3.org/2005/xpath-functions/#>
>> PREFIX smf: <http://www.topquadrant.com/sparqlmotion/smf.html#smf:>
>>
>> SELECT ?id ?label ?isAnnotationOf ?cat_relation ?cat_parent_label ?type
>> FROM <rmi://localhost/fedora#ri>
>> WHERE {
>> ?cat dc:identifier ?id;
>>  rdfs:label ?cat_label;
>>         rel:isAnnotationOf ?file;
>>        rel:isPartOf ?col1.
>>  FILTER (regex(str(?id), '.*qudex.*') && (str(?col1) =
>> 'info:fedora/qudex:1011'))
>>     LET (?cat_relation := fn:substring(str(?col1),
>> smf:lastIndexOf(str(?col1),'/') + 2)).
>>     LET (?isAnnotationOf := fn:substring(str(?file),
>> smf:lastIndexOf(str(?file),'/') + 2)).
>>     LET (?cat_parent_label := fn:substring(?cat_label, 0,
>> smf:lastIndexOf(?cat_label,':')+1)).
>>     LET (?label := fn:substring(?cat_label,
>> smf:lastIndexOf(?cat_label,':') +2)).
>>     LET (?type := 'Category').
>> }
>>
>> Any idea on this?
>>
>> Best,
>> Agustina
>>
>> 2012/12/8 Paul Gearon <gearon at ieee.org>
>>
>>> No, they shouldn't have. I've updated some code, but it's unreleased
>>> since the full set of tests aren't passing on Java 7.
>>>
>>> I checked what's on the server, and it does have the same md5sum as you
>>> report, but the file says that it was last touched on Jan 11 (a compromised
>>> system could still say that, but this is an initial check). If anything
>>> though, I wouldn't expect an error like what you are reporting. I also
>>> can't say how you could have had a different checksum, unless you had been
>>> using 2.1.12 by accident?
>>>
>>> Looking at the error, it looks like a boolean used where a numeric
>>> expression was required. The opposite is valid (due to EBVs), but not this.
>>> I don't know how the query used to work for you but I'm wondering what it
>>> looks like. Could I see one of the problem queries please?
>>>
>>> Paul
>>>
>>>
>>> On Fri, Dec 7, 2012 at 6:27 PM, Agustina Martinez <amgcia at gmail.com>wrote:
>>>
>>>> Hello,
>>>>
>>>> I am experiencing very odd behaviour. I downloaded and installed
>>>> mulgara 2.1.13 a few months ago, and has been running a set of queries
>>>> without any issues.
>>>>
>>>> Today I installed a new system and downloaded the binaries again from
>>>> the website since I didn't have them anymore from before and for the same
>>>> set of queries I now get the exception:
>>>>
>>>> Query failed: org.mulgara.query.filter.value.Bool cannot be cast to
>>>> org.mulgara.query.filter.value.NumericExpression
>>>>
>>>> I have no idea what's going on. I have checked the files checksums fron
>>>> the recently downloaded mulgara-2.1.13.jar and the one that I downloaded
>>>> before and they are different:
>>>>
>>>> Downloaded today: e8594482cff3e09afbfa88ab8893df6b
>>>> Previously downloaded: df7f617e876a627a61173060c76f0202
>>>>
>>>> Have the binaries been changed recently, after the initial release in
>>>> Jan 2012?
>>>>
>>>> Cheers,
>>>> Agustina
>>>>
>>>> _______________________________________________
>>>> Mulgara-dev mailing list
>>>> Mulgara-dev at mulgara.org
>>>> http://lists.mulgara.org/mailman/listinfo/mulgara-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Mulgara-dev mailing list
>>> Mulgara-dev at mulgara.org
>>> http://lists.mulgara.org/mailman/listinfo/mulgara-dev
>>>
>>>
>>
>> _______________________________________________
>> Mulgara-dev mailing list
>> Mulgara-dev at mulgara.org
>> http://lists.mulgara.org/mailman/listinfo/mulgara-dev
>>
>>
>
> _______________________________________________
> Mulgara-dev mailing list
> Mulgara-dev at mulgara.org
> http://lists.mulgara.org/mailman/listinfo/mulgara-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mulgara.org/pipermail/mulgara-dev/attachments/20121210/ded34ae5/attachment-0001.html>


More information about the Mulgara-dev mailing list