Fixing ‘file’ access is not allowed due to restriction set by the accessExternalSchema property in Java 8

After installing Java 8, I faced this issue ‘schema_reference: Failed to read schema document ‘MyWebservice.xsd_1.xsd’, because ‘file’ access is not allowed due to restriction set by the accessExternalSchema property’ when i tried to create web service client for my Java EE Webservice in Netbeans. Upon investigation i found that the error is happening for all java 8 users who is working with web service clients. to fix this error, please do the following.
Please create a file named ‘jaxp.properties‘ and paste the below content to it.
javax.xml.accessExternalSchema = all

save the file to your jdk installation directory/jre/lib folder.

that’s it. the issue will be fixed now. happy coding.

11 thoughts on “Fixing ‘file’ access is not allowed due to restriction set by the accessExternalSchema property in Java 8”

  1. I had the jaxp.properties in jdk installation directory/jre/. After reading your post I moved it into the lib dir and it worked! Thanks!

  2. Hey there, I think your blog might be having browser compatibility issues.
    When I look at your blog site in Safari, it looks fine but
    when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other
    then that, terrific blog!

  3. I tried this with no luck. Still seeing same access error. Using jdk-8u131 and IntelliJ IDEA 2016.3.4 . All i’m trying to do is create a java proxy for a remote service from wsdl. I’ve tried Netbeans, NEON (EE) and IntelliJIDEA, i can’t believe how complex and convoluted this process is… none of the “wizards” seem to work as suggested/described. Any suggestions would be appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.