The workaround is to disable FPS or entity expansion limit (be careful now your code can be vulnerable to denial of service attack, see replies on Bug ID: JDK-4843787 org.xml.sax.SAXException was thrown when parsing large file )
XMLInputFactory factory = XMLInputFactory.newInstance();
XMLSecurityManager securityManager = new XMLSecurityManager(false);
factory.setProperty("http://apache.org/xml/properties/security-manager", securityManager);
(here is a link to the source: https://community.oracle.com/thread/2594170)
Any suggestion how I can change the startup script to make this change?
My other option is to chop the owl file to peaces to load it in, but this would not be cool :)
Hope to hear from you soon, and thanks for all you hard work.
Cheers,
Roman
I am trying to load an ontology (owl file) into a stardog's database and getting this error:
Message: JAXP00010001: The parser has encountered more than "64000" entity expansions in this document;After a quick research it looks like this has something to do with with bug in Java JDK and the workaround is recommended as the following steps:The workaround is to disable FPS or entity expansion limit (be careful now your code can be vulnerable to denial of service attack, see replies on Bug ID: JDK-4843787 org.xml.sax.SAXException was thrown when parsing large file )
- set system property jdk.xml.entityExpansionLimit to 0
- disable FPS in XMLSecurityManager for XMLInputFactory:
XMLInputFactory factory = XMLInputFactory.newInstance();
XMLSecurityManager securityManager = new XMLSecurityManager(false);
factory.setProperty("http://apache.org/xml/properties/security-manager", securityManager);
(here is a link to the source: https://community.oracle.com/thread/2594170)
Any suggestion how I can change the startup script to make this change?
My other option is to chop the owl file to peaces to load it in, but this would not be cool :)
Hope to hear from you soon, and thanks for all you hard work.
Cheers,
Roman
--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en