Really?!?

I've checking everything, query, data, specification, etc.. and the error
was a wrong prefix declaration!

Michel, next time instead of manually witting the prefixes, use the awesome
service by Richard Cyganiak: http://prefix.cc/xsd.sparql

On Wed, Sep 23, 2015 at 11:42 PM, Richard Calmbach <rcalm...@gmail.com>
wrote:

> Might this be the problem:
>
> PREFIX xsd: <http://www/w3/org/2001/XMLSchema#>
>
> Try:
>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
>
> -Richard
>
> On Wed, Sep 23, 2015 at 9:02 AM, Sergio Fernández <wik...@apache.org>
> wrote:
>
>> Squebi hides too much the error in the query evaluation, right. But if
>> it's a public instance, you can see the error response either accessing the
>> http console of your browser or sending directly the query to the endpoint:
>>
>> curl 'http://marmotta.tno.nl:8080/marmotta/sparql/select' -H
>> 'Content-Type: application/sparql-query;charset=UTF-8' -H 'Accept:
>> application/sparql-results+json' --data-binary $'PREFIX rdf: <
>> http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX xsd: <
>> http://www/w3/org/2001/XMLSchema#>\nPREFIX odysseus: <
>> http://marmotta.tno.nl:8080/marmotta/context/>\nPREFIX cmo: <
>> http://www.modelservers.org/public/ontologies/cmo/cmo.ttl#>\nPREFIX
>> depc: 
>> <http://www.modelservers.org/public/ontologies/odysseus/depc.ttl#>\nPREFIX
>> rome: <http://www.modelservers.org/public/ontologies/odysseus/rome.ttl#>\n
>> \nSELECT ?Profile ?TimeStamp ?Quantity\nWHERE\n{\n        GRAPH
>> odysseus:romedata\n{\n      {\n          ?Profile depc:measuredBy rome:1824
>> ;\n           depc:hasTimePointProperty ?TimePoint .\n         ?TimePoint
>> depc:timeStamp ?TimeStamp  .\n         ?TimePoint cmo:quantity ?Quantity .
>>      \n         FILTER (xsd:dateTime(?TimeStamp) >
>> xsd:dateTime(\'2015-09-01T00:00:00\')) .\n         FILTER
>> (xsd:dateTime(?TimeStamp) < xsd:dateTime(\'2015-09-01T02:00:00\'))
>> .\n}\n}\n}'
>>
>> And see the stacktrace:
>>
>> org.apache.marmotta.platform.core.exception.MarmottaException: error
>> while evaluating query
>> at
>> org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$5.call(SparqlServiceImpl.java:311)
>> at
>> org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$5.call(SparqlServiceImpl.java:279)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: org.openrdf.query.QueryEvaluationException: Unknown function '
>> http://www/w3/org/2001/XMLSchema#dateTime'
>> at
>> org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:1529)
>> ...
>>
>> Which basically says that xsd:dateTime() is not a valid function. So it
>> looks there is an issue with the cast functions. Please, report the details
>> to Jira and we'll see how to address it.
>>
>> Apologize for that problem.
>>
>> Cheers,
>>
>>
>> On Wed, Sep 23, 2015 at 2:07 PM, Bohms, H.M. (Michel) <
>> michel.bo...@tno.nl> wrote:
>>
>>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>>>
>>> PREFIX xsd: <http://www/w3/org/2001/XMLSchema#>
>>>
>>> PREFIX odysseus: <http://marmotta.tno.nl:8080/marmotta/context/>
>>>
>>> PREFIX cmo: <http://www.modelservers.org/public/ontologies/cmo/cmo.ttl#>
>>>
>>>
>>> PREFIX depc: <
>>> http://www.modelservers.org/public/ontologies/odysseus/depc.ttl#>
>>>
>>> PREFIX rome: <
>>> http://www.modelservers.org/public/ontologies/odysseus/rome.ttl#>
>>>
>>>
>>>
>>> SELECT ?Profile ?TimeStamp ?Quantity
>>>
>>> WHERE
>>>
>>> {
>>>
>>>         GRAPH odysseus:romedata
>>>
>>> {
>>>
>>>       {
>>>
>>>           ?Profile depc:measuredBy rome:1824 ;
>>>
>>>            depc:hasTimePointProperty ?TimePoint .
>>>
>>>          ?TimePoint depc:timeStamp ?TimeStamp  .
>>>
>>>          ?TimePoint cmo:quantity ?Quantity .
>>>
>>>          FILTER (xsd:dateTime(?TimeStamp) >
>>> xsd:dateTime('2015-09-01T00:00:00')) .
>>>
>>>          FILTER (xsd:dateTime(?TimeStamp) <
>>> xsd:dateTime('2015-09-01T02:00:00')) .
>>>
>>> }
>>>
>>> }
>>>
>>> }
>>>
>>> Applied at: http://marmotta.tno.nl:8080/marmotta/
>>>
>>>
>>>
>>> Stack trace at server I cannot Access right now….
>>>
>>>
>>>
>>> I also tried things like:
>>>
>>>          FILTER (?TimeStamp > '2015-09-01T00:00:00') .
>>>
>>>          FILTER (?TimeStamp < '2015-09-01T02:00:00') .
>>>
>>>
>>>
>>> Giving no results at all (but no error…).
>>>
>>>
>>>
>>>
>>>
>>> Thx a lot! michel
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Dr. ir. H.M. (Michel) Bohms
>>> Sr. Research Scientist
>>> Structural Reliability
>>>
>>> T +31 (0)88 866 31 07
>>> M +31 (0)63 038 12 20
>>> E michel.bo...@tno.nl
>>>
>>> Location <http://www.tno.nl/locaties/DTM>
>>>
>>>
>>>
>>> <http://www.tno.nl/>
>>>
>>> This message may contain information that is not intended for you. If
>>> you are not the addressee or if this message was sent to you by mistake,
>>> you are requested to inform the sender and delete the message. TNO accepts
>>> no liability for the content of this e-mail, for the manner in which you
>>> use it and for damage of any kind resulting from the risks inherent to the
>>> electronic transmission of messages.
>>>
>>>
>>>
>>> *From:* Sergio Fernández [mailto:wik...@apache.org]
>>> *Sent:* woensdag 23 september 2015 13:53
>>> *To:* users@marmotta.apache.org
>>> *Subject:* Re: error while evaluating property...whats wrong here?
>>>
>>>
>>>
>>> Hi Michel, a textual version of the query and stacktrace would help to
>>> give you an answer ;-)
>>>
>>>
>>>
>>> On Wed, Sep 23, 2015 at 1:37 PM, Bohms, H.M. (Michel) <
>>> michel.bo...@tno.nl> wrote:
>>>
>>>
>>>
>>> Fyi: data in file is of form 2015-09-01T23:45:00.000+02:00^^xsd:dateTime
>>>
>>>
>>>
>>> I also tried:
>>>
>>>          FILTER (xsd:dateTime(?TimeStamp) >
>>> xsd:dateTime('2015-09-01T00:00:00')) .
>>>
>>>          FILTER (xsd:dateTime(?TimeStamp) <
>>> xsd:dateTime('2015-09-01T02:00:00')) .
>>>
>>>
>>>
>>> Same result…
>>>
>>>
>>>
>>> Thanks for advice!
>>>
>>>
>>>
>>>
>>>
>>> Dr. ir. H.M. (Michel) Bohms
>>> Sr. Research Scientist
>>> Structural Reliability
>>>
>>> T +31 (0)88 866 31 07
>>> M +31 (0)63 038 12 20
>>> E michel.bo...@tno.nl
>>>
>>> Location <http://www.tno.nl/locaties/DTM>
>>>
>>>
>>>
>>> <http://www.tno.nl/>
>>>
>>> This message may contain information that is not intended for you. If
>>> you are not the addressee or if this message was sent to you by mistake,
>>> you are requested to inform the sender and delete the message. TNO accepts
>>> no liability for the content of this e-mail, for the manner in which you
>>> use it and for damage of any kind resulting from the risks inherent to the
>>> electronic transmission of messages.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Sergio Fernández
>>> Partner Technology Manager
>>> Redlink GmbH
>>> m: +43 6602747925
>>> e: sergio.fernan...@redlink.co
>>> w: http://redlink.co
>>>
>>
>>
>>
>> --
>> Sergio Fernández
>> Partner Technology Manager
>> Redlink GmbH
>> m: +43 6602747925
>> e: sergio.fernan...@redlink.co
>> w: http://redlink.co
>>
>> --
>> Sergio Fernández
>> Partner Technology Manager
>> Redlink GmbH
>> m: +43 6602747925
>> e: sergio.fernan...@redlink.co
>> w: http://redlink.co
>>
>

Reply via email to