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
Schema validation issue when setting xml attributes to TransformerFactory in AbstractXmlConfigHelper.java #17998
Comments
@mayurgithub thanks for the issue report. This looks similar to #17839 which is fixed in 4.1.1 by #17868 - you will have to explicitly ignore failures during enabling XXE protection by setting system property |
Thanks for the quick response Vassilis. Adding that property helped get it beyond that error but it still fails to create an instance of Hazelcast and fails. |
Thanks for the update. Can you post what is the exception now? |
@mayurgithub I created a very simple project with Xalan 2.7.2 & Hazelcast 4.1 and I verified the original exception you posted. Once I upgraded hazelcast to 4.1.1 and added |
I added the property to hazelcast.xml
The error is shown below.
|
@mayurgithub I see. You need to set this as a system property, not a Hazelcast configuration property. So you can do this in two ways:
|
Thank for the clarification Vassilis. I added that property. I still see the same error though
|
Hi Vassilis, Config cfg = new Config();
cfg.setProperty("hazelcast.ignoreXxeProtectionFailures", "true");
HazelcastInstance instance = Hazelcast.newHazelcastInstance(cfg); For some reason the |
The documentation is misleading: And there is an example how to set system properties declarative, as mayurgithub tried to do: |
Describe the bug
When setting xml attributes in AbstractXmlConfigHelper.java
we see an
IllegalArgumentException
thrown.Expected behavior
If these attributes are set within a try catch block, it wouldn't block starting the server.
Or use
transformerFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
This is because in com/sun/org/apache/xalan/internal/xsltctrax/TransformerFactoryImpl.java:
Steps to reproduce:
While parsing the hazelcast.xml file this error is thrown.
Additional context
Common details that we're often interested in:
TransformerFactoryImpl
) - 2.7.2The text was updated successfully, but these errors were encountered: