I have upgraded my ant build project from Java 6 to Java 8, Weblogic 10 to weblogic 12c and from spring 3 to Spring 5.
When i try to build my project it gives me the error,
"**[xjc] [ERROR] schema_reference: Failed to read schema document 'GetCurrentLowestOpenRankRequestV01.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.
[xjc] line 17 of file:/C:/Users/n510029/Documents/wkspace/RevManV2InventoryServiceWS/src/main/resources/api/xsd/InventoryServiceV01.xsd
[xjc] failure in the XJC task. Use the Ant -verbose switch for more details**"
I have added the property **-Djavax.xml.accessExternalSchema=all** in the jvm arguments. Now the build is working fine.
But when i do the deployment in weblogic 12c, i faced another problem
org.xml.sax.SAXParseException;
systemId: zip:C:/Users/n510029/Documents/Softwares/weblogic12c/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/RevManV2InventoryServiceWS/8a98bw/war/WEB-INF/lib/_wl_cls_gen.jar!/main/resources/api/xsd/InventoryServiceV01.xsd; lineNumber: 17; columnNumber: 169; schema_reference:
Failed to read schema document 'GetCurrentLowestOpenRankRequestV01.xsd', because 'zip' access is not allowed due to restriction set by the accessExternalSchema property. :org.xml.sax.SAXParseException:schema_reference:
Failed to read schema document 'GetCurrentLowestOpenRankRequestV01.xsd', because 'zip' access is not allowed due to restriction set by the accessExternalSchema property.
Can you please help me solve this issue
```
I have tried multiple scenarios
1. I have added the property javax.xml.accessExternalSchema = all in the weblogic startup file. It didnt workout.
2. Created a file named jaxp.properties under /path/to/jdk1.8.0/jre/lib and added javax.xml.accessExternalSchema = all. But this also didn't work.
3. I have contacted Oracle Java team on this and they have confirmed that the xsd parsing is working fine. So its not java8 issue. by using the xjc of Java8 -->
xjc -disableXmlSecurity InventoryServiceV01.xsd.
They have suggested it might be due to Spring upgrade.