Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminationStatus is OK but No triples are Loaded #62

Closed
BethanyZhou opened this issue Dec 2, 2018 · 8 comments
Closed

terminationStatus is OK but No triples are Loaded #62

BethanyZhou opened this issue Dec 2, 2018 · 8 comments

Comments

@BethanyZhou
Copy link

@BethanyZhou BethanyZhou commented Dec 2, 2018

Hey, jbarrasa,

I face a strange problem now. The console showed as below when I committed importRDF command.

terminationStatus | triplesLoaded | namespaces | extraInfo
"OK" | 0 |  {} | ""

But actually, the rdf file I used contains some triples. I doubted that something is error in my file so that I changed another file that says success in this "Issues" Part. Unfortunately, it still goes bad. I hope you can help me.

best wish,
Beth

@jbarrasa
Copy link
Collaborator

@jbarrasa jbarrasa commented Dec 3, 2018

Hi Beth, any chance you can share the RDF file you're trying to load and the params you're passing to the importRDF procedure so I can try to reproduce?

Cheers,
JB.

@BethanyZhou
Copy link
Author

@BethanyZhou BethanyZhou commented Dec 3, 2018

Hi, jbarrasa, the RDF file I am trying shows as following.

<rdf:RDF
xmlns:prov="http://www.w3.org/ns/prov#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:beth="http://www.beth.com/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:sythprov="http://www.sythprov.com/">

<rdf:Description rdf:about="http://www.sythprov.com/a-little-provenance-goes-a-long-way">
<rdf:type rdf:resource="http://www.w3.org/ns/prov#Entity"/>
<prov:value rdf:datatype="http://www.w3.org/2001/XMLSchema#string">A little provenance goes a long way</prov:value>
</rdf:Description>

<rdf:Description rdf:about="http://www.sythprov.com/Beth">
<rdf:type rdf:resource="http://www.w3.org/ns/prov#Agent"/>
rdfs:labelBeth Zhou</rdfs:label>
</rdf:Description>

<rdf:Description rdf:about="http://www.sythprov.com/transfer">
<rdf:type rdf:resource="http://www.w3.org/ns/prov#Activity"/>
<prov:wasAssociatedWith rdf:resource="http://www.sythprov.com/Beth"/>
<prov:used rdf:resource="http://www.beth.com/LittleSemanticsWeb.html"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.sythprov.com/a-little-provenance-goes-a-long-way">
<prov:wasGeneratedBy rdf:resource="http://www.sythprov.com/transfer"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.beth.com/LittleSemanticsWeb.html">
<rdf:type rdf:resource="http://www.w3.org/ns/prov#Entity"/>
</rdf:Description>

</rdf:RDF>

And the params I am passing are

CALL semantics.importRDF("D:/eclipse-workspace/ProvToolbox-Tutorial1-0.7.0/little.rdf","RDF/XML", { shortenUrls: false, typesToLabels: true, commitSize: 9000 })

Cheers,
Beth

@BethanyZhou BethanyZhou changed the title terminationStatus is OK but No triple are Loaded terminationStatus is OK but No triples are Loaded Dec 3, 2018
@jbarrasa
Copy link
Collaborator

@jbarrasa jbarrasa commented Dec 4, 2018

Hi Beth, thanks for that.
The RDF is malformed, I get the following error:

"The element type "rdf:Description" must be terminated by the matching end-tag "</rdf:Description>". [line 16, column 22]"

When I fixed the RDF as follows (notice the added opening and closing tag in bold):

<rdf:Description rdf:about="http://www.sythprov.com/Beth">
<rdf:type rdf:resource="http://www.w3.org/ns/prov#Agent"/>
<rdfs:label> Beth Zhou</rdfs:label>
</rdf:Description>

I re-run the import and all 9 triples in the file were loaded correctly.

JB.

@BethanyZhou
Copy link
Author

@BethanyZhou BethanyZhou commented Dec 4, 2018

Hi jbarrsa,

It was very kind for you to help me. But after I fixed the RDF, the file still couldn't be loaded corretly. The console message still shows "terminationStatus is OK and triplesLoaded is 0". you can notice that I never got error message. Is there something wrong during my installation process? I did intall as following steps:

  1. Copy the the jar(s) in the <NEO_HOME>/plugins directory.
  2. Add the one line to <NEO_HOME>/conf/neo4j.conf.

My environment is Win10, neo4j-community-3.5.0 and neosemantics-3.4.0.2.jar.

Cheers,
Beth

@jbarrasa
Copy link
Collaborator

@jbarrasa jbarrasa commented Dec 4, 2018

Hi Beth, that's strange. Is there anything in the logs?
Also, does this happen with this particular RDF file only? Or do you get the same behaviour every time you run the import proc with any file?

@BethanyZhou
Copy link
Author

@BethanyZhou BethanyZhou commented Dec 4, 2018

Hi jbarrasa, there is nothing in neo4j browser.
but I find something in neo4j logs as follows.

java.net.MalformedURLException: unknown protocol: d
at java.net.URL.(URL.java:600)
at java.net.URL.(URL.java:490)
at java.net.URL.(URL.java:439)
at semantics.RDFImport.importRDF(RDFImport.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.neo4j.kernel.impl.proc.ReflectiveProcedureCompiler$ReflectiveProcedure.apply(ReflectiveProcedureCompiler.java:648)
at org.neo4j.kernel.impl.proc.ProcedureRegistry.callProcedure(ProcedureRegistry.java:219)
at org.neo4j.kernel.impl.proc.Procedures.callProcedure(Procedures.java:290)
at org.neo4j.kernel.impl.newapi.AllStoreHolder.callProcedure(AllStoreHolder.java:1072)
at org.neo4j.kernel.impl.newapi.AllStoreHolder.procedureCallWrite(AllStoreHolder.java:852)
at org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundQueryContext$$anonfun$6.apply(TransactionBoundQueryContext.scala:876)
at org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundQueryContext$$anonfun$6.apply(TransactionBoundQueryContext.scala:876)
at org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundQueryContext.callProcedure(TransactionBoundQueryContext.scala:939)
at org.neo4j.cypher.internal.runtime.interpreted.TransactionBoundQueryContext.callReadWriteProcedure(TransactionBoundQueryContext.scala:877)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext$$anonfun$callReadWriteProcedure$1.apply(ExceptionTranslatingQueryContext.scala:149)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext$$anonfun$callReadWriteProcedure$1.apply(ExceptionTranslatingQueryContext.scala:149)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslationSupport$class.translateException(ExceptionTranslationSupport.scala:33)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext.translateException(ExceptionTranslatingQueryContext.scala:41)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslationSupport$class.translateIterator(ExceptionTranslationSupport.scala:57)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext.translateIterator(ExceptionTranslatingQueryContext.scala:41)
at org.neo4j.cypher.internal.compatibility.v3_4.ExceptionTranslatingQueryContext.callReadWriteProcedure(ExceptionTranslatingQueryContext.scala:149)
at org.neo4j.cypher.internal.runtime.EagerReadWriteCallMode.callProcedure(ProcedureCallMode.scala:64)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.ProcedureExecutionResult.executeCall(ProcedureExecutionResult.scala:73)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.ProcedureExecutionResult.(ProcedureExecutionResult.scala:69)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.ProcedureCallExecutionPlan.createNormalExecutionResult(ProcedureCallExecutionPlan.scala:90)
at org.neo4j.cypher.internal.compatibility.v3_4.runtime.executionplan.procs.ProcedureCallExecutionPlan.run(ProcedureCallExecutionPlan.scala:80)
at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run$1.apply(LatestRuntimeVariablePlannerCompatibility.scala:128)
at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper$$anonfun$run$1.apply(LatestRuntimeVariablePlannerCompatibility.scala:124)
at org.neo4j.cypher.exceptionHandler$runSafely$.apply(exceptionHandler.scala:89)
at org.neo4j.cypher.internal.compatibility.LatestRuntimeVariablePlannerCompatibility$ExecutionPlanWrapper.run(LatestRuntimeVariablePlannerCompatibility.scala:124)
at org.neo4j.cypher.internal.PreparedPlanExecution.execute(PreparedPlanExecution.scala:29)
at org.neo4j.cypher.internal.ExecutionEngine.execute(ExecutionEngine.scala:119)
at org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(ExecutionEngine.java:61)
at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI$1.start(TransactionStateMachineSPI.java:144)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.startExecution(TransactionStateMachine.java:444)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.execute(TransactionStateMachine.java:259)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.run(TransactionStateMachine.java:240)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:81)
at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$2.run(BoltStateMachine.java:457)
at org.neo4j.bolt.v1.runtime.BoltStateMachine.run(BoltStateMachine.java:225)
at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onRun$3(BoltMessageRouter.java:93)
at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:195)
at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:143)
at org.neo4j.bolt.runtime.ExecutorBoltScheduler.executeBatch(ExecutorBoltScheduler.java:170)
at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$scheduleBatchOrHandleError$2(ExecutorBoltScheduler.java:153)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Here is the RDF I used.

<rdf:RDF
xmlns:prov="http://www.w3.org/ns/prov#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:beth="http://www.beth.com/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:sythprov="http://www.sythprov.com/">

<rdf:Description rdf:about="http://www.sythprov.com/a-little-provenance-goes-a-long-way">
<rdf:type rdf:resource="http://www.w3.org/ns/prov#Entity"/>
<prov:value rdf:datatype="http://www.w3.org/2001/XMLSchema#string">A little provenance goes a long way</prov:value>
</rdf:Description>

<rdf:Description rdf:about="http://www.sythprov.com/Beth">
<rdf:type rdf:resource="http://www.w3.org/ns/prov#Agent"/>
rdfs:labelBeth Zhou</rdfs:label>
</rdf:Description>

<rdf:Description rdf:about="http://www.sythprov.com/transfer">
<rdf:type rdf:resource="http://www.w3.org/ns/prov#Activity"/>
<prov:wasAssociatedWith rdf:resource="http://www.sythprov.com/Beth"/>
<prov:used rdf:resource="http://www.beth.com/LittleSemanticsWeb.html"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.sythprov.com/a-little-provenance-goes-a-long-way">
<prov:wasGeneratedBy rdf:resource="http://www.sythprov.com/transfer"/>
</rdf:Description>

<rdf:Description rdf:about="http://www.beth.com/LittleSemanticsWeb.html">
<rdf:type rdf:resource="http://www.w3.org/ns/prov#Entity"/>
</rdf:Description>

</rdf:RDF>

When I run CALL semantics.importRDF("https://www.w3.org/ns/org.ttl","Turtle",{ languageFilter: 'en' }), everything is ok.

Another strange thing is that the RDF I show you is as below.

1

But when I preview my comments, it changes to
_20181204230115

Beth

@jbarrasa
Copy link
Collaborator

@jbarrasa jbarrasa commented Dec 4, 2018

Ok, I think I got it. Neo4j does not like the path to your RDF file. It's not a valid URL.

Can you try to prefix it with file:/// to make it a well formed URL?

Something like this (notice the change to the first argument of the importRDF proc):
CALL semantics.importRDF("file:///D:/eclipse-workspace/ProvToolbox-Tutorial1-0.7.0/little.rdf","RDF/XML", { shortenUrls: false, typesToLabels: true, commitSize: 9000 })

I hope that fixes it.

JB.

@BethanyZhou
Copy link
Author

@BethanyZhou BethanyZhou commented Dec 4, 2018

It works! Thanks a lot!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants