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

Failed to invoke procedure apoc.import.graphml: Caused by: java.lang.RuntimeException: Error executing in separate thread #159

Open
neo-technology-build-agent opened this issue Sep 1, 2022 · 7 comments

Comments

@neo-technology-build-agent
Copy link
Collaborator

Issue by chrix75
Tuesday Nov 08, 2016 at 19:51 GMT
Originally opened as neo4j-contrib/neo4j-apoc-procedures#206


Hi,

I've exported a graph with the procedure apoc.export.graphml but when I try to import it again I've got this error:

Failed to invoke procedure apoc.import.graphml: Caused by: java.lang.RuntimeException: Error executing in separate thread

Thanks for your help.

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by jexp
Tuesday Apr 11, 2017 at 06:43 GMT


@chrix75 can you try again with a more recent release?

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by CliffordAnderson
Saturday Jun 10, 2017 at 17:41 GMT


@jexp I came across this same error recently and discovered that the problem arose from multiple values in my graphML attributes. I think it was nodes like these that triggered the error.

<graphml:edge source="58D5137C8FA1793C8138A4D840D1E0D5 761BFF77D39020017D0C6F72E037AC95" target="AEA35A20938FFEDCDD9BD8B219264EE0" label="CREATED">
      <graphml:data key="label">CREATED</graphml:data>
</graphml:edge>

So basically a parsing issue. It might be nice to provide feedback about such errors in the debug log.

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by MaryamMahmoodi
Saturday Jan 19, 2019 at 16:04 GMT


@jexp
Hi I have a problem like above
I have neo4j 3.4.10 and apoc 3.4.0.4 , and I should import a graphml file that is created with apoc 3.5, but when import the file I got this error on neo4j :
Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure apoc.import.graphml: Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3810,158]
Message: An invalid XML character (Unicode: 0x0) was found in the element content of the document.

I need some help to resole that .

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by jexp
Sunday Jan 20, 2019 at 23:49 GMT


Can you share the generated file and the call you used to generate it?

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by cocof-cirb
Tuesday Aug 27, 2019 at 13:02 GMT


Hi there.

Same problem with graphml import on Neo4j desktop 1.2.1 and APOC 3.5.0.4 .

The graphml was generated with Yed (3.19).

In my case, the problem is in the definition of an attribute. I have a "xml:space preserve" that breaks the apoc import.

  <key attr.name="restBaseUrl" attr.type="string" for="node" id="d5">
    <default xml:space="preserve"/>
  </key>

The import succeeds when I remove manually the <default xml:space="preserve"/> from the graphml xml file.

The root cause may be that I changed the type of this attribute from XML to String and that Yed left some XML specific things not expected for a string attribute. Just a supposition.

Find in attachment a minimalist file that reproduces the apoc import problem.

minimal_broken.graphml.zip

HTH,
/Bruno

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by thekidconnect
Friday Nov 13, 2020 at 00:27 GMT


getting the same error on neo4j @ 4.1-latest

docker exec neo4j cypher-shell -u neo4j -p admin "CALL apoc.import.graphml('profile.graphml', {})" Failed to invoke procedure apoc.import.graphml: Caused by: java.util.NoSuchElementException: ParseError at [row,col]:[1,1] Message: Premature end of file.

did they ever fix this?

@neo-technology-build-agent
Copy link
Collaborator Author

Comment by vga91
Thursday Aug 05, 2021 at 16:20 GMT


@thekidconnect
Your problem seems to be different from the previous comments.
It can probably be caused by the presence of a BOM character at the beginning of the xml (in this case there is already an open issue #1674).

If this is your case, to fix the problem temporarily, would you be able to generate the xml without the BOM?
Otherwise, can you attach the xml file with the error?

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

No branches or pull requests

1 participant