Error on SPARQL Query tab

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error on SPARQL Query tab

ysg11
Hello,
I am getting below error when I load the owl file in protege and try to open the SPARQL Query tab.


2017-03-26 23:47:57.056 [AWT-EventQueue-0] ERROR ProtegeApplication    Uncaught Exception in thread 'AWT-EventQueue-0'
java.lang.NoSuchMethodError: org.semanticweb.owlapi.rdf.model.AbstractTranslator.<init>(Lorg/semanticweb/owlapi/model/OWLOntologyManager;Lorg/semanticweb/owlapi/model/OWLOntology;ZLorg/semanticweb/owlapi/util/IndividualAppearance;)V
        at org.protege.owl.rdf.impl.RDFTranslator.<init>(RDFTranslator.java:91) ~[na:na]

If there is no owl file and then I try to open this tab it works fine but is of no use as I cannot actually query anything. I tried updating the jar in plugin but it did not help.
Is there any other SPARQL Query tool which can be used?

Thanks,
yogita
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error on SPARQL Query tab

samsontu
Hi,

The problem has been reported on the Protege issue tracker #625 [1]. Apparently it’s caused by the SPARQL tab using some non-public OWL API constructors and classes that have changed recently. The work-around is to use the Snap SPARQL Query instead.

With best regards,
Samson



On Mar 26, 2017, at 2:51 PM, ysg11 <[hidden email]> wrote:

Hello,
I am getting below error when I load the owl file in protege and try to open
the SPARQL Query tab.


2017-03-26 23:47:57.056 [AWT-EventQueue-0] ERROR ProtegeApplication   
Uncaught Exception in thread 'AWT-EventQueue-0'
java.lang.NoSuchMethodError:
org.semanticweb.owlapi.rdf.model.AbstractTranslator.<init>(Lorg/semanticweb/owlapi/model/OWLOntologyManager;Lorg/semanticweb/owlapi/model/OWLOntology;ZLorg/semanticweb/owlapi/util/IndividualAppearance;)V
at org.protege.owl.rdf.impl.RDFTranslator.<init>(RDFTranslator.java:91)
~[na:na]

If there is no owl file and then I try to open this tab it works fine but is
of no use as I cannot actually query anything. I tried updating the jar in
plugin but it did not help.
Is there any other SPARQL Query tool which can be used?

Thanks,
yogita



--
View this message in context: http://protege-project.136.n4.nabble.com/Error-on-SPARQL-Query-tab-tp4667955.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

-- 
Samson Tu                                                      email: [hidden email]
Senior Research Engineer                              web: www.stanford.edu/~swt/
Center for Biomedical Informatics Research  phone: 1-650-725-3391
Stanford University                                          fax: 1-650-725-7944




_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error on SPARQL Query tab

ysg11
Hello,
Thank you for the info. I have tried using SNAP SPARQL. But I am not able to run simple queries like

select *
Where { ont:tag1 ?p ?o }

or queries with Having clause

SELECT  ?node (COUNT(?id ) AS ?count )
WHERE {?node node_has_id ?id . }
GROUP BY ?node
HAVING( ?count > 0)

I think it still does not support such queries. Are there any other plugins/external tools which can help to run such SPARQL queries?

Best Regards,
Yogita
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error on SPARQL Query tab

Lorenz Buehmann
What means "not able"? Snap SPARQL supports full SPARQL 1.1

> Hello,
> Thank you for the info. I have tried using SNAP SPARQL. But I am not able to
> run simple queries like
>
> select *
> Where { ont:tag1 ?p ?o }
>
> or queries with Having clause
>
> SELECT  ?node (COUNT(?id ) AS ?count )
> WHERE {?node node_has_id ?id . }
> GROUP BY ?node
> HAVING( ?count > 0)
>
> I think it still does not support such queries. Are there any other
> plugins/external tools which can help to run such SPARQL queries?
>
> Best Regards,
> Yogita
>
>
>
> --
> View this message in context: http://protege-project.136.n4.nabble.com/Error-on-SPARQL-Query-tab-tp4667955p4667984.html
> Sent from the Protege User mailing list archive at Nabble.com.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
--
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error on SPARQL Query tab

ysg11
It does not return me any results. I have tried  below query on twinkle tool for same owl file. This same query works in twinkle and it does not give me any result in Snap SPARQL

select *
Where { ont:tag1 ?p ?o }

The having query also does not return any result. I have tried different conditions in having
SELECT  ?node (COUNT(?id ) AS ?count )
WHERE {?node node_has_id ?id . }
 GROUP BY ?node
 HAVING( ?count > 0)

Without having clause these are my results
?node ?count
N1        1
N2        1
N3        1
...

Snap does not show me any syntax error for having query. I could not test this query in twinkle as it does not support count.

Regards,
Yogita

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error on SPARQL Query tab

Lorenz Buehmann
Try

SELECT  ?node (COUNT(?id ) AS ?count )
WHERE {?node node_has_id ?id . }
GROUP BY ?node
HAVING( COUNT(?id ) > 0)



It does not return me any results. I have tried  below query on twinkle tool
for same owl file. This same query works in twinkle and it does not give me
any result in Snap SPARQL

select *
Where { ont:tag1 ?p ?o } 

The having query also does not return any result. I have tried different
conditions in having 
SELECT  ?node (COUNT(?id ) AS ?count )
WHERE {?node node_has_id ?id . }
 GROUP BY ?node
 HAVING( ?count > 0)

Without having clause these are my results
?node ?count
N1        1
N2        1
N3        1
...

Snap does not show me any syntax error for having query. I could not test
this query in twinkle as it does not support count.

Regards,
Yogita





--
View this message in context: http://protege-project.136.n4.nabble.com/Error-on-SPARQL-Query-tab-tp4667955p4667993.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error on SPARQL Query tab

ysg11
It still does not return any result.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error on SPARQL Query tab

ysg11
If you see HAVING is also not getting highlighted like other keywords eg select,where,group by.
However it t does give me option on Ctlr+space of HAVING.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error on SPARQL Query tab

Lorenz Buehmann
The developer (Matthew Horridge) told me that HAVING is not implemented yet.
That means you'll have to use the default SPARQL plugin - once the OWL API bug is fixed. Right now the whole plugin doesn't work.

If you see HAVING is also not getting highlighted like other keywords eg
select,where,group by. 
However it t does give me option on Ctlr+space of HAVING.



--
View this message in context: http://protege-project.136.n4.nabble.com/Error-on-SPARQL-Query-tab-tp4667955p4667996.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error on SPARQL Query tab

Csongor Nyulas
Administrator
FYI, the bug has been fixed, and the plugin can be updated through the auto-update mechanism. See instructions here:
https://github.com/protegeproject/protege/issues/625#issuecomment-293424694

Csongor

On 04/03/2017 11:15 PM, Lorenz B. wrote:
The developer (Matthew Horridge) told me that HAVING is not implemented yet.
That means you'll have to use the default SPARQL plugin - once the OWL API bug is fixed. Right now the whole plugin doesn't work.

If you see HAVING is also not getting highlighted like other keywords eg
select,where,group by. 
However it t does give me option on Ctlr+space of HAVING.



--
View this message in context: http://protege-project.136.n4.nabble.com/Error-on-SPARQL-Query-tab-tp4667955p4667996.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Loading...