Попытка добавить комплект apache-cxf в мое приложение. Но при запуске приложения появляется следующая ошибка
Не удалось создать экземпляр
[org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping]: фабричный метод 'payloadRootAnnotationMethodEndpointMapping' вызвал исключение; Вложенным исключением является java.lang.ExceptionInInitializerError
что вызвано
Вызвано: java.lang.IllegalArgumentException: не поддерживается: http://javax.xml.XMLConstants/property/accessExternalDTD
Пытался добавить следующие свойства в задачу
wsdl2java {
System.setProperty('javax.xml.accessExternalSchema', 'all')
System.setProperty('javax.xml.accessExternalDTD','all')
generatedWsdlDir = file("src/main/generated-sources/") // target directory for generated source code
wsdlsToGenerate = [ // 2d-array of wsdls and cxf-parameters
['src/main/resources/xsd/wsdl/***.wsdl'],
]
}
added the dependency as
compile group: 'org.apache.cxf', name: 'cxf-bundle', version: '2.4.2'
получая следующую ошибку
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping]: Factory method 'payloadRootAnnotationMethodEndpointMapping' threw exception; nested exception is java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalArgumentException: Not supported: http://javax.xml.XMLConstants/property/accessExternalDTD
at org.apache.xalan.processor.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:576) ~[xalan-2.7.1.jar:?]