¾Æ·¡¿Í °°ÀÌ wsdl2java ¸í·É¾î¸¦ ÅëÇØ wsdl ¿¡ ´ëÀÀÇÏ´Â java code ¸¦ »ý¼ºÇÏ·Á°í ÇÒ ¶§
Failed to read schema document 'xjc.xsd', because 'file' access is not allowed
¿¡·¯ ¸Þ½ÃÁö°¡ Ãâ·ÂµÇ´Â °æ¿ì°¡ ÀÖ´Ù.
$ wsdl2java \
-verbose -client -defaultValues \
-impl -validate \
-encoding UTF-8 \
-fe jaxws21 \
-p stub \
-wsdlLocation http://localhost:8080/services/contentStoreCxf?wsdl \
contentStore.wsdl
»ó¼¼ÇÑ ¿À·ù ¸Þ½ÃÁö´Â ¾Æ·¡¿Í °°´Ù.
¿µ¹®À¸·Î ¿À·ù ³»¿ëÀ» °Ë»öÇÒ ¶§ »ç¿ëÇϱâ À§ÇØ ¿µ¹® ¹öÀüµµ ÷ºÎÇÑ´Ù.
¡Ü ¿À·ù ³»¿ë (ÇѱÛ)
Exception in thread "main" java.lang.AssertionError: org.xml.sax.SAXParseException;
...
Caused by: org.xml.sax.SAXParseException;
systemId: jar:file:/Zany/DevTools/apache-cxf-2.7.18/lib/jaxb-xjc-2.2.6.jar!/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd;
lineNumber: 52; columnNumber: 88; schema_reference:
accessExternalSchema ¼Ó¼ºÀ¸·Î ¼³Á¤µÈ Á¦ÇÑÀ¸·Î ÀÎÇØ 'file' ¾×¼¼½º°¡ Çã¿ëµÇÁö ¾ÊÀ¸¹Ç·Î ½ºÅ°¸¶ ¹®¼ 'xjc.xsd' Àб⸦
½ÇÆÐÇß½À´Ï´Ù.
¡Ü ¿À·ù ³»¿ë (¿µ¹®)
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.
¡Ü JDK Version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
¿ÜºÎ ½ºÅ°¸¶ ¿¢¼¼½º ±ÇÇÑÀÌ ¾ø¾î¼ ¹ß»ýÇÏ´Â ¹®Á¦·Î, ¸µÅ©µÈ stackoverflow ¿Í Oracle JDK javax.xml.XMLConstants °ø½Ä
¹®¼¿¡ µû¸£¸é, $JAVA_HOME/lib/jaxp.properties ÆÄÀÏ¿¡(¾øÀ¸¸é ¸¸µé¾î¼) javax.xml.accessExternalSchema = all
°ú °°ÀÌ ¸í½ÃÇØÁÖ¸é µÈ´Ù°í ÇÔ.
½ÇÁ¦·Î ÇØ´ç properties ÆÄÀÏÀ» ¸¸µé¾î¼ »ý¼ºÇغ¸´Ï ¹®Á¦¾øÀÌ »ý¼ºµÊ.
$JAVA_HOME/lib/jaxp.properties ¿¡ ³Ö¾î¼ ¾ÈµÇ¸é,
$JAVA_HOME/jre/lib/jaxp.properties ·Î ¸¸µé¸é µÊ...
|