cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Java String Exception thrown when exporting data

lingvisa
Graph Fellow

My graph export code has been working well, until now a new node property 'graphEmbedding' of 256 dimension is added to each node. The relevant export code is below:

Export node ...
MATCH (m:Product)
WITH collect(DISTINCT m) AS M
CALL apoc.export.csv.data( M, [], null,  {stream:true, batchSize:2000000}) YIELD data
WITH apoc.text.replace(data, '(?:,"_start","_end","_type"|,,,)(?=\n)', '') AS mdata
RETURN mdata

The exception is:

File "/Users/congminmin/.venv/wbkg/lib/python3.8/site-packages/neo4j/work/result.py", line 227, in __iter__
    self._connection.fetch_message()  # Receive at least one message from the server, if available.
  File "/Users/congminmin/.venv/wbkg/lib/python3.8/site-packages/neo4j/work/result.py", line 62, in inner
    func(*args, **kwargs)
  File "/Users/congminmin/.venv/wbkg/lib/python3.8/site-packages/neo4j/io/_bolt4.py", line 271, in fetch_message
    response.on_failure(summary_metadata or {})
  File "/Users/congminmin/.venv/wbkg/lib/python3.8/site-packages/neo4j/io/_common.py", line 183, in on_failure
    raise Neo4jError.hydrate(**metadata)
neo4j.exceptions.DatabaseError: {code: Neo.DatabaseError.General.UnknownError} {message: This encoder depends on java.lang.StringCoding, which failed to load or apply: Index 16384 out of bounds for length 16384}

I am on MacPro and use Neo4j 4.2.6. 4.0.4 has the same issue. Because the graphEmbedding is a float vector of length 256, probably that's the reason causing the error: " Index 16384 out of bounds for length 16384"

Once I remove the graphEmbedding property from the graph, the export code runs well.

I used the method introduced here to create the embedding:

1 REPLY 1

lingvisa
Graph Fellow

I registered an issue here: