# \[neosemantics\] Load shacl data on startup (using apoc)

**URL:** <https://community.neo4j.com/t/neosemantics-load-shacl-data-on-startup-using-apoc/59854>\
**Category:** Ecosystem & Integrations\
**Tags:** migrated\
**Created:** [August 18, 2022, 10:21am UTC](https://community.neo4j.com/t/neosemantics-load-shacl-data-on-startup-using-apoc/59854 "2022-08-18T10:21:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![max\_beikirch](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/max_beikirch/32/3913_2.png) [@max\_beikirch](https://community.neo4j.com/u/max_beikirch)\
**Post date:** [August 18, 2022, 10:21am UTC](https://community.neo4j.com/t/neosemantics-load-shacl-data-on-startup-using-apoc/59854/1 "2022-08-18T10:21:16Z")

</div>

Hello,

I want to load shacl data on neo4j startup.

The following works to load "ordinary" graph data (in plan.cypher) and validation data (in validation.cypher)

I added the following to my neo4j.conf:  
dbms.security.procedures.unrestricted=apoc.\*

I added the following to my apoc.conf:

apoc.import.file.enabled=true  
apoc.import.file.use\_neo4j\_config=true  
apoc.initializer.neo4j.0=CALL apoc.cypher.runFile("file:///plan.cypher")  
apoc.initializer.neo4j.1=CALL apoc.cypher.runFile("file:///validation.cypher")

My plan.cypher contains a CREATE statement where I set up the graph. That works like a charm.

My validation.cypher contains the following:

CALL n10s.graphconfig.init({handleVocabUris:"IGNORE"}) yield param;  
CREATE CONSTRAINT n10s\_unique\_uri IF NOT EXISTS ON (r:Resource) ASSERT r.uri IS UNIQUE;  
CALL n10s.validation.shacl.import.inline('  
.... turtle file ....','Turtle') YIELD target RETURN target

If my validation.cypher only contains ...  
CALL n10s.graphconfig.init({handleVocabUris:"IGNORE"}) yield param;  
..., that works just fine.

That leaves me confused and I don't know if that's a bug in neosemantics or apoc or whether this behavior is actually supposed to work.

If I give my files to cypher-shell directly, everything works like a charm. I could provided stripped down versions of my file if that's helpful.

---

<div class="post-metadata">

**Author:** ![TrevorS](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/trevors/32/23179_2.png) [@TrevorS](https://community.neo4j.com/u/TrevorS)\
**Post date:** [August 22, 2022, 3:23pm UTC](https://community.neo4j.com/t/neosemantics-load-shacl-data-on-startup-using-apoc/59854/2 "2022-08-22T15:23:19Z")

</div>

Hello [@max\_beikirch](https://community.neo4j.com/t5/user/viewprofilepage/user-id/4630)  
If you are still facing an issue here, can you please create a [GitHub](https://github.com/neo4j) ticket and provide as much detail as possible including logs and configs, etc., and share a link to your GitHub ticket in reply to this thread. Or if you have a support contract open a ticket.

If you could resolve the issue, please reply with what you did to solve the problem so others can benefit from your troubleshooting!
