neosemantics icon indicating copy to clipboard operation
neosemantics copied to clipboard

Neo.ClientError.Procedure.ProcedureCallFailed while importing N-Triples file into neo4j

Open arunkrishce opened this issue 7 years ago • 32 comments

Hello, Here is my query to import N-Triples into my neo4j database,

CALL semantics.importRDF("file:///home/ak/Downloads/20170201.as-rel2.txt.33node.n3","N-Triples", { shortenUrls: true, typesToLabels: true, commitSize: 9000 }).

I am getting the below error while running it,

Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure semantics.importRDF: Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String.

The above query was working few days before and suddenly it throws this error. I don't understand where there is a mistake. I tried to downgrade the .jar release but no luck.

Please help me.

arunkrishce avatar Jul 09 '18 14:07 arunkrishce

Hi arunkrishce, Has the RDF file changed? Note that N-Triples and N3 notation are not the same. Can this explain the issue? It's hard to tell without more info. Can you share the RDF file you're trying to load?

JB

jbarrasa avatar Jul 09 '18 14:07 jbarrasa

I even tried with the same RDF file and got the same error. I tried with ttl (Turtle) format and got the same error too. Please find the attached file. 20170201.as-rel2.txt.33node.n3.tar.gz

arunkrishce avatar Jul 09 '18 14:07 arunkrishce

But with the same .n3(N-Triples notation) file, it was running fine and i was able to import the graph.

arunkrishce avatar Jul 09 '18 14:07 arunkrishce

I cannot reproduce the issue. It seems to work fine on neo4j 3.4.1 with neosemantics 3.4.0.1 I've run a preview of the file and it showed up nicely: call semantics.previewRDF("file:///Users/jesusbarrasa/Downloads/bug.n3", "N-Triples", {})

What version are you on? Can you try the preview and let me know what you get, please?

jbarrasa avatar Jul 09 '18 14:07 jbarrasa

Even the preview doesn't work on mine. My version is Neo4j Browser version: 3.2.2 Neo4j Server version: 3.4.3 (community) and neosemantics jar is same as yours.

arunkrishce avatar Jul 09 '18 15:07 arunkrishce

It shows the same error, java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String.

arunkrishce avatar Jul 09 '18 15:07 arunkrishce

anything in the log? what OS are you on? do you have the same problem with all files? or just with this one?

jbarrasa avatar Jul 09 '18 15:07 jbarrasa

I have problem with all the files. I currently use Ubuntu 16.04 LTS. I am surprised because it worked well and i took screenshot of the graph statistics too and suddenly it's not working. Do you want me to upgrade neo4j version?

arunkrishce avatar Jul 09 '18 15:07 arunkrishce

hang on, neo4j 3.4.3? the latest release is 3.4.1

jbarrasa avatar Jul 09 '18 15:07 jbarrasa

I am trying to install 3.4.1. I will let you know if i get the same error now.

arunkrishce avatar Jul 09 '18 15:07 arunkrishce

Neo4j Browser version: 3.1.14 Neo4j Server version: 3.4.1 (community) neosemantics-3.4.0.1.jar

This is what i have currently. PreviewRDF doesn't work on mine. Here is the query i ran,

call semantics.previewRDF("file:///home/ak/Downloads/20170201.as-rel2.txt.33node.n3", "N-Triples", {})

arunkrishce avatar Jul 09 '18 15:07 arunkrishce

Sorry, I cannot reproduce. It works fine with community as well. Is there any useful information in the logs/neo4j.log file?

jbarrasa avatar Jul 09 '18 16:07 jbarrasa

Could you please tell me the location of neo4j.log file. I could find only debug.log under /var/log/neo4j.

arunkrishce avatar Jul 09 '18 16:07 arunkrishce

https://neo4j.com/docs/operations-manual/current/configuration/file-locations/

jbarrasa avatar Jul 09 '18 17:07 jbarrasa

Yes i saw the link already but I couldn't find the home directory of neo4j, could you please help?

arunkrishce avatar Jul 09 '18 17:07 arunkrishce

I'm not very familiar with ubuntu myself, I'd recommend you join the neo4j slack channel and I'm sure you'll be able to get help there. Here's the link: https://neo4j.com/developer/slack/

jbarrasa avatar Jul 09 '18 17:07 jbarrasa

Please find the neo4j logs attached, neo4j.log.tar.gz

arunkrishce avatar Jul 09 '18 19:07 arunkrishce

I cannot see anything relevant in the log. So you said it used to work and it suddenly stopped? Was it after an update? Is it with the new version of neosemantics that you're finding the problem? I still have not been able to reproduce the problem.

jbarrasa avatar Jul 10 '18 08:07 jbarrasa

It was with the same version it worked. One fine evening i tried it worked and then i tried to run the same next morning and it wasn't working. Looks weird. I was using the 3.4.3 version only

arunkrishce avatar Jul 10 '18 12:07 arunkrishce

Similar issue: CALL semantics.importRDF("file:///var/lib/neo4j/import/kbpedia_reference_concepts.n3","N-Triples",{}) returns: Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure semantics.importRDF: Caused by: org.eclipse.rdf4j.rio.UnsupportedRDFormatException: Did not recognise RDF format object N-Triples (mimeTypes=application/n-triples, text/plain; ext=nt) Community neo4j 3.5.2 and a clean build of neosemantics fat jar 3.4.0.2

KnowledgeGarden avatar Feb 16 '19 22:02 KnowledgeGarden

My bad, but still strange. The file really is an n3 file, not an nt file, and RDFFormat.N3 does not appear to be listed on availableParsers. I did use Protege to attempt to rewrite the file as a ttl, but even that failed, though it's not clear Protege did the translation correctly. I suppose I'll add N3 to available parsers and try again. Did that. Added RDFFormat.N3 to parsers, built, restarted Neo4j. Called CALL semantics.importRDF("file:///var/lib/neo4j/import/kbpedia_reference_concepts.n3","N3",{}) and got Failed to invoke procedure semantics.importRDF: Caused by: org.eclipse.rdf4j.rio.UnsupportedRDFormatException: Did not recognise RDF format object N3 (mimeTypes=text/n3, text/rdf+n3; ext=n3)

KnowledgeGarden avatar Feb 17 '19 21:02 KnowledgeGarden

Hello, I am having the same problem. I have the previewRDF functioning perfectly, but every time I try to importRDF, it says "Failed to invoke procedure semantics.importRDF: Caused by: java.lang.NoSuchMethodError: org.neo4j.graphdb.schema.IndexDefinition.isCompositeIndex()Z"

OlivierPan avatar Nov 02 '19 19:11 OlivierPan

Hi @OlivierPan, this looks like an incompatibility between the versions of NSMNTX and Neo4j you're using. Could you share them so I can confirm, please?

Thanks,

JB.

jbarrasa avatar Nov 03 '19 01:11 jbarrasa

Hi, sorry for the super late comment, @KnowledgeGarden . How exactly did you add the N3 format? could you share your code?

jbarrasa avatar Nov 03 '19 01:11 jbarrasa

Indeed, I wish we could have had this conversation earlier. I can no longer recall the details, and have since moved on to other projects.

KnowledgeGarden avatar Nov 03 '19 04:11 KnowledgeGarden

Sorry to hear that, and thanks anyway. I'll try to be more responsive next time. Good luck.

JB.

jbarrasa avatar Nov 03 '19 10:11 jbarrasa

@jbarrasa Yes, indeed, I download the latest version and everything goes perfect. Thanks a lot.

OlivierPan avatar Nov 03 '19 16:11 OlivierPan

great to hear @OlivierPan

jbarrasa avatar Nov 04 '19 00:11 jbarrasa

Struggling to get this working - "There is no procedure with the name semantics.importRDF registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed." file reference text is good, but a consistent Neo.ClientError.Procedure.ProcedureNotFound. I have also tried different folders, but same error. should the triples file extension remain ntriples as per Permid website?

srs-source avatar Jul 16 '20 17:07 srs-source

Can you share the details of your setup, os and what versions of neo4j and neosemantics are you using?

jbarrasa avatar Jul 16 '20 17:07 jbarrasa