GraphQL errors validation report fails

46 views
Skip to first unread message

robatki...@gmail.com

unread,
Nov 23, 2021, 6:31:53 PM11/23/21
to TopBraid Suite Users
Have a very simple little ontology with some shapes that all displays and behaves as expected in the UI for an ontology asset until I turn on "problems and suggestions", then some (but not all) classes throw a exception report on focus.

problems and suggestions on the graph claims to generate some results but fails to present.

digging into the underlying graphql queries if fails on the field "focusNode { uri label }"

with the following ("best practice" completely opaque NPE  :-)  ):

Exception while fetching data (/graphReport/profile) : null


java.lang.NullPointerException
at org.topbraid.shaclx.graphql.query.engine.ResultsSupport.lambda$2(ResultsSupport.java:89)
at graphql.execution.ExecutionStrategy.fetchField(ExecutionStrategy.java:222)

I ran SHACL validation on the shapes in TBC- no issues. 

class it fails on look like this:

:X
  a owl:Class ;
  a sh:NodeShape ;
  rdfs:comment "a comment" ;
  rdfs:isDefinedBy  : ;
  rdfs:label "A label" ;
  rdfs:subClassOf :Y;
.

where :Y is another class that looks exactly the same and doesnt have a problem...

The set of classes available in graphql - querying the meta-shapes includes all the classes.

The available classes select box  in the graphql link on the export tab has only one I can discover (:Z a sibling of :X) 

GraphQL allows me to search on that one but not the others 

if i hack the query 
http://localhost:8083/tbl/graphql/surveylineobs/%3AOccupationObservation then it seems happy to query for instances (none as expected - but no errors)

am i missing something obvious? 

are there other diagnostic approaches I can use?

Can we entreat as users never to be faced with  NPEs and always to indicate what thing raised the error.. 




Holger Knublauch

unread,
Nov 24, 2021, 1:50:14 AM11/24/21
to topbrai...@googlegroups.com

Hi Rob,

could it be that you have these two settings as shown:

I noticed that my code crashes with an NPE if the Profiling info is requested without first running the SHACL validation.

I will fix this for 7.1 final, and I hope you can easily work around this by changing either of the two check boxes?

Thanks
Holger

PS: The difficulty with error handling is not to print better error messages but to first understand all cases where a value could be null. If I know that something can be null, I wouldn't even have to worry about a better error message in the first place...

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/30861cac-3982-470d-9d0d-cef4d76f721dn%40googlegroups.com.

robatki...@gmail.com

unread,
Nov 24, 2021, 4:36:08 PM11/24/21
to TopBraid Suite Users
OK thanks for the heads up...

I have looked at all the settings options i can see in the server admin and on the editor and settings tabs - and tried to search documentation - but i can't find where that settings dialog is  :-/  - can you point me to the right location please..

Holger Knublauch

unread,
Nov 24, 2021, 6:50:55 PM11/24/21
to topbrai...@googlegroups.com

Ah sorry I wasn't clear, but those settings are in drop down of the upper right corner of the Problems & Suggestions panel.

HTH
Holger

Rob Atkinson

unread,
Nov 24, 2021, 10:07:35 PM11/24/21
to topbrai...@googlegroups.com
ahh - so I was mainly looking for way to set this as a global default? 

Holger Knublauch

unread,
Nov 24, 2021, 10:27:25 PM11/24/21
to topbrai...@googlegroups.com

For most settings you can set global defaults for all users

but not for the Problems & Suggestions (because they don't have icons that the corresponding dialog requires).

However, if you just leave them as default you should not run into the bug, and that will be fixed in 7.1 anyway.

Holger

Reply all
Reply to author
Forward
0 new messages