Search code examples
javaexceptionneo4jrdfwordnet

Neo4J JAXP00010001: The parser has encountered more than "64000" entity expansions in this document


When trying to import wordnet 2.0 RDF into Neo4J through neosemantics neosemantics extension for import queries with more than 64,000 records to be imported JDK throws below exception and only about 50000 records are imported.

JAXP00010001: The parser has encountered more than "64000" entity expansions in this document; this is the limit imposed by the JDK. [line 1, column 1]


Solution

  • On looking I found that entityExpansionLimit parameter's value has to be changed. The default value of entityExpansionLimit after JRE 1.7_45 is 64000

    To set this in Neo4j do the following;

    • Open Projects
    • Click on Manage on your database
    • Go Settings of the database add dbms.jvm.additional=-Djdk.xml.entityExpansionLimit=0
    • Click on Apply
    • The database will be restarted; if not Restart it by clicking on restart button.

    ------OR-------

    • Open the neo4j.conf file from C:\Users\PC_USER_NAME\AppData\Roaming\Neo4j Desktop\Application\neo4jDatabases\database-XXXX\installation-3.X.X\conf
    • Add dbms.jvm.additional=-Djdk.xml.entityExpansionLimit=0 and save the file.
    • Restart the database.

    You can rerun your query.

    Hope it helps and saves time for those who run into same error.