org.xml.sax.SAXNotRecognizedException: property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not reregned
我想在我的项目中防止XXE攻击。这是一个旧的api项目,运行在java 7(没有maven)和jboss-as-7服务器上。但在执行过程中,我得到错误:org.xml.sax.SAXNotRecognizedException:属性“http://javax.xml.XMLConstants/property/accessExternalDTD”无法识别。
org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
15:19:02,845 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.apache.xerces.jaxp.validation.ValidatorImpl.setProperty(ValidatorImpl.java:218)
15:19:02,846 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at com.uid.kua.web.KUARestController.authenticateAtAUA(KUARestController.java:118)
15:19:02,847 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:19:02,847 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
15:19:02,848 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:19:02,849 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at java.lang.reflect.Method.invoke(Method.java:606)
我已经搜索了它,每个论坛都有一些不同的含义,说它是一个错误。我没有找到任何与此例外相关的解决方案。请帮忙。提前致谢。