tpluscode opened a new issue, #2129:
URL: https://github.com/apache/jena/issues/2129

   ### Version
   
   4.10
   
   ### What happened?
   
   When validating SHACL, Jena appears too strict when parsing property shapes, 
as it requires `sh:path` in all cases
   
   See https://s.zazuko.com/3rcogrc. It should find a violation where the 
`schema:name` is commented out in data graph.
   
   ### Relevant output and stacktrace
   
   ```shell
   In Jena, using `shacl` CLI:
   
   
   org.apache.jena.shacl.parser.ShaclParseException: No sh:path on a property 
shape: node=<https://cube.link/shape/ObservationConstraintProperty> sh:property 
_:B1af3c02cc02fe669e29397afbbf3405c
        at 
org.apache.jena.shacl.parser.ShapesParser.findPropertyShapes(ShapesParser.java:403)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseShape$(ShapesParser.java:327)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseShapeStep(ShapesParser.java:305)
        at 
org.apache.jena.shacl.parser.Constraints.parseConstraint(Constraints.java:201)
        at 
org.apache.jena.shacl.parser.Constraints.lambda$parseConstraints$21(Constraints.java:159)
        at 
org.apache.jena.mem.ArrayBunch$2.forEachRemaining(ArrayBunch.java:129)
        at 
org.apache.jena.util.iterator.WrappedIterator.forEachRemaining(WrappedIterator.java:113)
        at 
org.apache.jena.mem.TrackingTripleIterator.forEachRemaining(TrackingTripleIterator.java:58)
        at 
org.apache.jena.shacl.parser.Constraints.parseConstraints(Constraints.java:150)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseShape$(ShapesParser.java:319)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseShapeStep(ShapesParser.java:305)
        at 
org.apache.jena.shacl.parser.ShapesParser.findPropertyShapes(ShapesParser.java:409)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseShape$(ShapesParser.java:327)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseShapeStep(ShapesParser.java:305)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseShape(ShapesParser.java:236)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseShapeAcc(ShapesParser.java:221)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseShapes(ShapesParser.java:163)
        at 
org.apache.jena.shacl.parser.ShapesParser.parseProcess(ShapesParser.java:100)
        at org.apache.jena.shacl.Shapes.parseProcess(Shapes.java:111)
        at org.apache.jena.shacl.Shapes.parseAll(Shapes.java:106)
        at org.apache.jena.shacl.Shapes.parse(Shapes.java:83)
        at 
org.apache.jena.shacl.validation.ShaclPlainValidator.parse(ShaclPlainValidator.java:38)
        at 
org.apache.jena.shacl.validation.ShaclPlainValidator.validate(ShaclPlainValidator.java:90)
        at shacl.shacl_validate.exec(shacl_validate.java:124)
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87)
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56)
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43)
        at shacl.shacl_validate.main(shacl_validate.java:60)
        at shacl.shacl.main(shacl.java:75)
   ```
   ```
   
   
   ### Are you interested in making a pull request?
   
   None


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to