May I know how to construct edge properties graph like the picture in this blog?
I constructed the example of the manual in stardog but it split into a new node [object object].
It looks like I get the following error when I try to add
:Pete a { :since 2010 ; until 2018} :Engineer ;
:worksAt { :source :HR } :Stardog
There was a fatal failure during preparation of 52bc5871-29de-464e-9b8c-900fb0235b9a com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
and the following stacktrace in the logs
This is with Stardog 7.1.2 with the option edge.properties=true enabled
WARN 2020-02-11 16:36:49,017 [stardog-user-2] com.complexible.common.rdf.rio.RDFStreamProcessor:setException(599): Error during loading /opt/stardog-7.1.2/test.ttl: Nested edge properties are not allowed [L1]
WARN 2020-02-11 16:36:49,018 [stardog-user-2] com.complexible.common.rdf.rio.RDFStreamProcessor:setException(606): Parse process creator:
java.lang.Exception: null
at com.complexible.common.rdf.rio.RDFStreamProcessor.<init>(RDFStreamProcessor.java:137) ~[stardog-utils-rdf-7.1.2.jar:?]
at com.complexible.common.rdf.rio.RDFStreamProcessor.create(RDFStreamProcessor.java:113) ~[stardog-utils-rdf-7.1.2.jar:?]
at com.complexible.stardog.index.BaseIndexWriterDataMap.update(BaseIndexWriterDataMap.java:100) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.index.BaseIndexWriterDataMap.add(BaseIndexWriterDataMap.java:70) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.index.BaseIndexWriter.add(BaseIndexWriter.java:117) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.index.Indexes.add(Indexes.java:379) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.apply(ConnectableIndexRWConnectionImpl.java:656) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.apply(ConnectableIndexRWConnectionImpl.java:379) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.ConnectableConnectionCollection.apply(ConnectableConnectionCollection.java:194) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.apply(DatabaseConnectionImpl.java:770) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:801) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.add(DatabaseImpl.java:1329) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$KernelDbConnection.add(StardogKernel.java:3358) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.add(StardogKernel.java:3455) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.lambda$null$2(TransactionService.java:175) ~[stardog-protocols-http-server-7.1.2.jar:?]
at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419) ~[?:1.8.0_232]
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[?:1.8.0_232]
at com.complexible.stardog.protocols.http.server.TransactionService.lambda$processUpdate$3(TransactionService.java:175) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:206) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:171) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.add(TransactionService.java:157) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.1.2.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
ERROR 2020-02-11 16:36:49,018 [stardog-user-2] com.complexible.tx.api.impl.DefaultTransaction:computePrepareResult(471): There was a fatal failure during preparation of 464eaf62-7785-4c75-9beb-4d8fcb3aede0
java.lang.RuntimeException: com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
at com.complexible.stardog.index.BaseIndexWriterDataMap.waitForUpdates(BaseIndexWriterDataMap.java:151) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.index.BaseIndexWriter.sync(BaseIndexWriter.java:126) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.prepare(ConnectableIndexRWConnectionImpl.java:551) ~[stardog-7.1.2.jar:?]
at com.complexible.tx.api.BaseResourceTransaction.prepare(BaseResourceTransaction.java:158) ~[stardog-7.1.2.jar:?]
at com.complexible.tx.api.impl.DefaultTransaction.computePrepareResult(DefaultTransaction.java:455) ~[stardog-7.1.2.jar:?]
at com.complexible.tx.api.impl.DefaultTransaction.runPreparePhase(DefaultTransaction.java:422) ~[stardog-7.1.2.jar:?]
at com.complexible.tx.api.impl.DefaultTransaction.commit(DefaultTransaction.java:308) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.commit(DatabaseConnectionImpl.java:498) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseImpl$MonitoredDbConnection.commit(DatabaseImpl.java:1674) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.commit(DatabaseImpl.java:1432) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$KernelDbConnection.commit(StardogKernel.java:3298) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.commit(StardogKernel.java:3567) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeCommit(ProtocolUtils.java:686) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:210) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:171) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.add(TransactionService.java:157) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.1.2.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Caused by: com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
at com.stardog.stark.io.ParserContext.error(ParserContext.java:231) ~[stardog-stark-io-api-7.1.2.jar:?]
at com.stardog.stark.io.ParserContext.error(ParserContext.java:219) ~[stardog-stark-io-api-7.1.2.jar:?]
at com.stardog.stark.io.turtle.TurtleParser.parsePredicateWithEdgeProperties(TurtleParser.java:277) ~[stardog-stark-io-turtle-7.1.2.jar:?]
at com.stardog.stark.io.turtle.TurtleParser.parsePredicateObjectList(TurtleParser.java:244) ~[stardog-stark-io-turtle-7.1.2.jar:?]
at com.stardog.stark.io.trig.TrigParser.parseGraph(TrigParser.java:184) ~[stardog-stark-io-trig-7.1.2.jar:?]
at com.stardog.stark.io.trig.TrigParser.parseStatement(TrigParser.java:71) ~[stardog-stark-io-trig-7.1.2.jar:?]
at com.stardog.stark.io.turtle.TurtleParser.parse(TurtleParser.java:110) ~[stardog-stark-io-turtle-7.1.2.jar:?]
at com.complexible.common.rdf.rio.RDFStreamBuilder$RDFAbstractStream.parse(RDFStreamBuilder.java:300) ~[stardog-utils-rdf-7.1.2.jar:?]
at com.complexible.common.rdf.rio.RDFStreamBuilder$RDFAbstractStream.parse(RDFStreamBuilder.java:260) ~[stardog-utils-rdf-7.1.2.jar:?]
at com.complexible.common.rdf.rio.DelegatingRDFStream.parse(DelegatingRDFStream.java:28) ~[stardog-utils-rdf-7.1.2.jar:?]
at com.complexible.stardog.db.EmbeddedRDFStream.parse(EmbeddedRDFStream.java:35) ~[stardog-7.1.2.jar:?]
at com.complexible.common.rdf.rio.RDFStreamProcessor$ConcurrentLoadManagerImpl.add(RDFStreamProcessor.java:504) ~[stardog-utils-rdf-7.1.2.jar:?]
at com.complexible.common.rdf.rio.RDFStreamProcessor.add(RDFStreamProcessor.java:216) ~[stardog-utils-rdf-7.1.2.jar:?]
at com.complexible.stardog.index.BaseIndexWriterDataMap.update(BaseIndexWriterDataMap.java:132) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.index.BaseIndexWriterDataMap.add(BaseIndexWriterDataMap.java:70) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.index.BaseIndexWriter.add(BaseIndexWriter.java:117) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.index.Indexes.add(Indexes.java:379) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl$IndexResourceTransaction.apply(ConnectableIndexRWConnectionImpl.java:656) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.index.ConnectableIndexRWConnectionImpl.apply(ConnectableIndexRWConnectionImpl.java:379) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.ConnectableConnectionCollection.apply(ConnectableConnectionCollection.java:194) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.apply(DatabaseConnectionImpl.java:770) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.add(DatabaseConnectionImpl.java:801) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.add(DatabaseImpl.java:1329) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$KernelDbConnection.add(StardogKernel.java:3358) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.add(DelegatingDatabaseConnection.java:223) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.add(StardogKernel.java:3455) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.lambda$null$2(TransactionService.java:175) ~[stardog-protocols-http-server-7.1.2.jar:?]
at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419) ~[?:1.8.0_232]
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[?:1.8.0_232]
at com.complexible.stardog.protocols.http.server.TransactionService.lambda$processUpdate$3(TransactionService.java:175) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:206) ~[stardog-protocols-http-server-7.1.2.jar:?]
... 8 more
ERROR 2020-02-11 16:36:49,019 [stardog-user-2] com.complexible.stardog.db.DatabaseConnectionImpl:commit(509): There was an error committing the transaction, all changes were rolled back successfully
com.complexible.tx.api.HeuristicRollbackException: There was a fatal failure during preparation of 464eaf62-7785-4c75-9beb-4d8fcb3aede0 com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
at com.complexible.tx.api.impl.DefaultTransaction.runPreparePhase(DefaultTransaction.java:426) ~[stardog-7.1.2.jar:?]
at com.complexible.tx.api.impl.DefaultTransaction.commit(DefaultTransaction.java:308) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.commit(DatabaseConnectionImpl.java:498) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseImpl$MonitoredDbConnection.commit(DatabaseImpl.java:1674) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.commit(DatabaseImpl.java:1432) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$KernelDbConnection.commit(StardogKernel.java:3298) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.commit(StardogKernel.java:3567) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeCommit(ProtocolUtils.java:686) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:210) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:171) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.add(TransactionService.java:157) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.1.2.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
WARN 2020-02-11 16:36:49,020 [stardog-user-2] com.complexible.stardog.protocols.http.server.StardogUndertowErrorHandler:accept(61): Unexpected exception was handled by the server
com.complexible.tx.api.HeuristicRollbackException: There was a fatal failure during preparation of 464eaf62-7785-4c75-9beb-4d8fcb3aede0 com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
at com.complexible.tx.api.impl.DefaultTransaction.runPreparePhase(DefaultTransaction.java:426) ~[stardog-7.1.2.jar:?]
at com.complexible.tx.api.impl.DefaultTransaction.commit(DefaultTransaction.java:308) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseConnectionImpl.commit(DatabaseConnectionImpl.java:498) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseImpl$MonitoredDbConnection.commit(DatabaseImpl.java:1674) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DatabaseImpl$DBConnectionWrapper.commit(DatabaseImpl.java:1432) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$KernelDbConnection.commit(StardogKernel.java:3298) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.db.DelegatingDatabaseConnection.commit(DelegatingDatabaseConnection.java:292) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.StardogKernel$NotifyingDatabaseConnection.commit(StardogKernel.java:3567) ~[stardog-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeCommit(ProtocolUtils.java:686) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:210) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.processUpdate(TransactionService.java:171) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.complexible.stardog.protocols.http.server.TransactionService.add(TransactionService.java:157) ~[stardog-protocols-http-server-7.1.2.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.1.2.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
There was a fatal failure during preparation of 791d39f4-ae3b-4a32-84b1-7a48957822e1 com.stardog.stark.io.InvalidRDF: Nested embedded statements are not supported: (<< (<< (http://api.stardog.com/Pete http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://api.stardog.com/Engineer) >> http://api.stardog.com/since "2010"^^<http://www.w3.org/2001/XMLSchema#integer>) >> http://api.stardog.com/since "2010"^^<http://www.w3.org/2001/XMLSchema#integer>)
If I change it to
:Pete a { :since 2010 ; until 2018} :Engineer ;
:worksAt { :source :HR } :Stardog .
and add with
stardog data add test test.ttl
I get
Adding data from file: test.ttl
There was a fatal failure during preparation of e8c56c20-776a-43cc-981a-f7b249ea3dae com.stardog.stark.io.InvalidRDF: Nested edge properties are not allowed [L1]
Zach, you're right, the . was a red herring. The real issue is rather technical but if you restart the server, you should be able to load that snipper (regardless of it using the Stardog EP syntax or not). Just make sure you fix :until. Let us know otherwise.
Your data and query are syntactically valid. Just restart the server to avoid the parsing issue Zach hit earlier in this thread.
I added your file with the stardog data add command to a database created with the -o edge.properties=true option. Then I connected Studio, ran your CONSTRUCT query and clicked on the "Visual" button in the results. I'm attaching the resulting image.
What version of Studio do you use? What results do you get if you run the query from the console, i.e. using the stardog query {db name} {path to query file}?
No, I mean the version of Stardog Studio, i.e. the front-end app, not the version of Stardog. You can see it in the top menu: Stardog Studio -> About Stardog Studio. I suspect you may need to update it.