Please use the Apache issue tracking system for new NetBeans issues ( !!

Bug 241570

Summary: Wizard fails to create class from wsdl, in maven project and JavaFX client
Product: webservices Reporter: albert.af77
Component: ClientAssignee: Milan Kuchtiak <mkuchtiak>
Status: RESOLVED WONTFIX QA Contact: issues <>
Priority: P2 CC: markiewb, pjiricka
Version: 8.0   
Target Milestone: TBD   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Report: Failed to read schema document 'NewWebService.xsd_1.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.

Description albert.af77 2014-02-08 13:28:56 UTC
Steps to reproduce
Open the javaFx project
Right click on
select New
Select "Web Service Client"
Select "WSDL URL"
Add a valid wsdl url.
Click "Finish"

cd D:\albert\Proyectos\workSpaceNB8\mavenproject2; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0" cmd /c "\"\"C:\\Program Files\\NetBeans 8.0 Beta\\java\\maven\\bin\\mvn.bat\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.0 Beta\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 compile\""
Scanning for projects...
Building mavenproject2 1.0-SNAPSHOT

--- jaxws-maven-plugin:2.3:wsimport (wsimport-generate-NewWebService) @ mavenproject2 ---
Processing: file:/D:/albert/Proyectos/workSpaceNB8/mavenproject2/src/wsdl/localhost_8080/mavenproject1/NewWebService.wsdl
jaxws:wsimport args: [-keep, -s, D:\albert\Proyectos\workSpaceNB8\mavenproject2\target\generated-sources\jaxws-wsimport, -d, D:\albert\Proyectos\workSpaceNB8\mavenproject2\target\classes, -verbose, -encoding, UTF-8, -extension, -Xnocompile, -catalog, D:\albert\Proyectos\workSpaceNB8\mavenproject2\src\jax-ws-catalog.xml, -wsdllocation, http://localhost:8080/mavenproject1/NewWebService?wsdl, "file:/D:/albert/Proyectos/workSpaceNB8/mavenproject2/src/wsdl/localhost_8080/mavenproject1/NewWebService.wsdl"]
parsing WSDL...

schema_reference: Failed to read schema document 'NewWebService.xsd_1.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property. 
  line 4 of file:/D:/albert/Proyectos/workSpaceNB8/mavenproject2/src/wsdl/localhost_8080/mavenproject1/NewWebService.wsdl#types?schema1

Exception in thread "main" java.lang.ClassCastException: java.lang.AssertionError cannot be cast to java.lang.Exception
	at org.jvnet.jax_ws_commons.jaxws.Invoker.main(
Total time: 2.277s
Finished at: Sat Feb 08 09:09:02 BOT 2014
Final Memory: 6M/177M
Failed to execute goal org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.3:wsimport (wsimport-generate-NewWebService) on project mavenproject2: Mojo failed - check output -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1]
Comment 1 Milan Kuchtiak 2014-02-14 14:37:54 UTC
The reason is the following:

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

You have likely (in your environment) set on this restrinction, for JAXP parser.

Try to swith the restriction off in netbeans_home/etc/netbeans.conf:

Comment 2 phansson 2014-06-30 14:50:50 UTC
To anyone that finds this.

This is a result of a new, more restrictive, JAXP (v1.5) which is included with JDK 7u40 onwards and JDK8. The problem as such has nothing to do with NB, JavaFX or Maven.

As noted it can be "solved" by setting system property javax.xml.accessExternalSchema=all. Since the bug reporter uses Maven it needs to be a Maven solution. In this situation it doesn't help to set the property on the IDE.

Here's what I add to my pom.xml in order to fix this problem:

        <!-- Needed with JAXP 1.5 -->

So, what I actually add is the <vmArgs> stuff.

The question is if it would make sense if NetBeans IDE always added this for you when it first generates the project ?
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo