Why does this sparql query hang

1 view
Skip to first unread message

ren...@gmail.com

unread,
May 28, 2014, 7:35:01 AM5/28/14
to sta...@clarkparsia.com
Hi,

I've a rdf graph with just two triples:
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <http://example.com/ontology1#> .

:Person rdf:type owl:Class .
:Jack rdf:type :Person .

When I execute the following query in a Stardog Web Console, the execution does not end.
prefix : <http://example.com/ontology1#>
select ?s ?p ?o
where {
 
?s a :Person .
 
?o a owl:Class .
 
?s ?p ?o .
}

But if I remove either "?s a :Person" or "?o a owl:Class" from the query, than it finishes as expected.

Does anyone have any ideas why?

- Renars

Mike Grove

unread,
May 28, 2014, 9:04:27 AM5/28/14
to stardog
Is this a complete example?  I added the data you've shown to a database and I can run that query from both the CLI and the web console just fine.

What do you mean by the query does not finish in the console?  Is the busy icon in the top left still showing and no results at the bottom of the page below the editor?

Cheers,

Mike
 

- Renars

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

ren...@gmail.com

unread,
May 28, 2014, 9:23:37 AM5/28/14
to sta...@clarkparsia.com
Yes, it's a complete example. By the "query does not finish", I mean that the blue progress bar animation keeps going, but no results are shown (screenshot in attachment).

I'm using Stardog 2.1.3.
stardog_web_console_screenshot.png

Mike Grove

unread,
May 28, 2014, 9:29:28 AM5/28/14
to stardog
Have you tried the same query via the CLI?

Cheers,

Mike

Fernando Hernandez

unread,
May 28, 2014, 9:40:50 AM5/28/14
to sta...@clarkparsia.com
Renarl,

On Wed, May 28, 2014 at 9:23 AM, <ren...@gmail.com> wrote:
Yes, it's a complete example. By the "query does not finish", I mean that the blue progress bar animation keeps going, but no results are shown (screenshot in attachment).

I'm using Stardog 2.1.3.

What browser and version are you using?

Fernando 

ren...@gmail.com

unread,
May 28, 2014, 9:45:04 AM5/28/14
to sta...@clarkparsia.com
I just tried it via CLI and got an exception:
java.util.ConcurrentModificationException

The query was:
./bin/stardog query test2 "prefix : <http://example.com/ontology1#> select ?s ?p ?o where { ?s a :Person . ?o a owl:Class . ?s ?p ?o . }"


For the simpler query (without the "?o a owl:Class"), I get the expected result:
./bin/stardog query test2 "prefix : <http://example.com/ontology1#> select ?s ?p ?o where { ?s a :Person . ?s ?p ?o . }"
+-----------------------------------+----------+-------------------------------------+
|                 s                 |    p     |                  o                  |
+-----------------------------------+----------+-------------------------------------+
+-----------------------------------+----------+-------------------------------------+

So it seems to be a problem with that particular query.

ren...@gmail.com

unread,
May 28, 2014, 9:50:02 AM5/28/14
to sta...@clarkparsia.com, fern...@clarkparsia.com
I'm using Safari 7.0.3 on Mac OS 10.9.3

Could the problem be related to the fact that I use java 1.8 as the default java on my machine?

Kendall Clark

unread,
May 28, 2014, 10:07:23 AM5/28/14
to stardog, Fernando Hernandez
Which JDK?

We can't yet reproduce this with Mac 10.9.3, Java 1.8, Safari 7.0.3, etc.

Cheers,
Kendall


--

ren...@gmail.com

unread,
May 28, 2014, 10:09:54 AM5/28/14
to sta...@clarkparsia.com, Fernando Hernandez
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b05)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b05, mixed mode)

Fernando Hernandez

unread,
May 28, 2014, 10:13:24 AM5/28/14
to sta...@clarkparsia.com
On Wed, May 28, 2014 at 10:09 AM, <ren...@gmail.com> wrote:
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b05)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b05, mixed mode)

That's an 'early access' java 8 release. Could you try upgrading to the latest and run stardog again? I'm using the same OS but with:

java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)  

And it runs fine.

Fernando

ren...@gmail.com

unread,
May 28, 2014, 10:40:28 AM5/28/14
to sta...@clarkparsia.com, fern...@clarkparsia.com
Indeed, the 'early access' release was the culprit. Now that I upgraded to java 1.8.0_05 the query finishes with the correct results. 

Thanks a lot!
Reply all
Reply to author
Forward
0 new messages