WebService Client Generation Error with JDK8


Fixing problem with WebService Client Generation Error with JDK8


If you’re generating a WebService client in JDK8 and you’re having issues related to accessExternalSchema, similar to

schema_reference: Failed to read schema document 'xjc.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.

then, this recipe might be helpful.

How to

One of the possibilities is to create a file named jaxp.properties (if it doesn’t exist) under $JDK8_HOME/jre/lib and then write this line in it (take a look at the documentation here for more details):

javax.xml.accessExternalSchema = all

However, the solution I prefer, in case you’re using Maven (e.g., jaxws-maven-plugin) to generate your client, is to specify the vmArg that defines that property, like the following:



All explanations were made in place. Therefore, there’s nothing useful to add here, I suppose…


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s