wsdl 파일을 stub 코드로 변환할 때 에러와 함께 아래와 같은 에러메시지가 떴습니다.
java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: jar:file:/path/to/glassfish/modules/jaxb-osgi.jar!/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 52; columnNumber: 88; schema_reference: Failed to read schema document 'xjc.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.
여기서 핵심은 "because 'file' access is not allowed due to restriction set by the accessExternalSchema property." 이 부분입니다.
해당 에러를 해결하기 위해서는 /jdk 경로/jdk1.8.0/jre/lib 경로에 jaxp.properties 라는 파일을 생성하고 아래와 같은 내용을 작성하면 됩니다.
javax.xml.accessExternalSchema = all
위 방법으로 해결이 안된다면 jaxp.properties 파일에 아래와 같은 내용을 추가하는 방법도 있습니다.
javax.xml.accessExternalDTD = all
jre lib 디렉토리를 수정하고 싶지 않다면 IDE 설정에서 VM 매개변수에 아래 내용을 추가해주시면 됩니다.
-Djavax.xml.accessExternalSchema=all
[출처]
https://stackoverflow.com/questions/23011547/webservice-client-generation-error-with-jdk8%20
WebService Client Generation Error with JDK8
I need to consume a web service in my project. I use NetBeans so I right-clicked on my project and tried to add a new "Web Service Client". Last time I checked, this was the way to create a web ser...
stackoverflow.com
반응형
'[DEV] 기록' 카테고리의 다른 글
Eclipse, STS 한글 깨짐 방지 설정 (0) | 2020.07.20 |
---|---|
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment' (0) | 2020.07.20 |
css) div 내 div들을 가로로 동일한 간격으로 배치하는 방법 (0) | 2020.07.08 |
STS(Spring Tool Suite) ini 파일 설정 (0) | 2020.07.03 |
C++ >?= 문법 (1) | 2020.06.18 |