Search code examples
docker-composestardog

Entity expansion limit exceeded


While trying to import a OWL-file into Stardog using Stardog Studio, I receive the following error message

The parser has encountered more than "100,000" entity expansions in this document; this is the limit imposed by the application.

According to the Stardog forum and a number of online articles, this behaviour should be solved by setting jdk.xml.entityExpansionLimit property. I tried to set it to 2000000 using the following steps.

  1. Setting the STARDOG_SERVER_JAVA_ARGS='-DentityExpansionLimit=2000000 -Xmx8g' environment entry in docker-compose.
  2. Setting the STARDOG_SERVER_JAVA_ARGS='-Djdk.xml.entityExpansionLimit=2000000 -Xmx8g' environment entry in docker-compose.
  3. Creating a jaxp.properties file under the JDK lib folder containing either a jdk.xml.entityExpansionLimit=2000000 entry or a entityExpansionLimit=2000000 entry.

None of them seems to solve the problem... The same behaviour is posted in other SO-posts of 7 and 8 years ago, but they don't elaborate on the solution of the problem...

Did anyone found a solution for this behaviour? Any suggestions is highly appreciated!


Solution

  • Stardog doesn't allow users to change this setting (due to its security implications).

    You'll need to convert the file to another format before loading it into Stardog.