This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have a project that constains one xsd with same basic types for multiple projects, when a try to import the xsd into a new xsd in a WLM project and build I obtein always this error: ------------------- [Warning] testXML.xsd:7:121: schema_reference.4: Failed to read schema document 'TaskManagerTypes/BasicTypes.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. [Error] testXML.xsd:11:69: src-resolve: Cannot resolve the name 'ns0:frmString' to a(n) 'type definition' component. java.lang.RuntimeException: Message: java.io.FileNotFoundException: E:\Proyectos\Snacks\WLM\TaskManager\testImport\src\TaskManagerTypes\BasicTypes.xsd (The system cannot find the path specified) Location of invalid XML: <xsd:import schemaLocation="TaskManagerTypes/BasicTypes.xsd" namespace="http://xml.netbeans.org/schema/BasicTypes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://xml.netbeans.org/schema/testXML" xmlns:ns0="http://xml.netbeans.org/schema/BasicTypes"/> at org.netbeans.modules.wlm.project.anttasks.Util.writeXform(Util.java:442) at org.netbeans.modules.wlm.project.anttasks.Util.generateXForm(Util.java:295) at org.netbeans.modules.wlm.project.anttasks.XformGenerator.processFile(XformGenerator.java:154) at org.netbeans.modules.wlm.project.anttasks.XformGenerator.processFileObject(XformGenerator.java:121) at org.netbeans.modules.wlm.project.anttasks.XformGenerator.processFolder(XformGenerator.java:133) at org.netbeans.modules.wlm.project.anttasks.XformGenerator.processFileObject(XformGenerator.java:119) at org.netbeans.modules.wlm.project.anttasks.XformGenerator.processSourceDir(XformGenerator.java:110) at org.netbeans.modules.wlm.project.anttasks.XformGenerator.generate(XformGenerator.java:101) at org.netbeans.modules.wlm.project.anttasks.IDEXFormGenerationTask.execute(IDEXFormGenerationTask.java:115) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:273) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:499) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151) Caused by: org.apache.xmlbeans.XmlException: E:\Proyectos\Snacks\WLM\TaskManager\testImport\src\testXML.xsd:7:5: error: java.io.FileNotFoundException: E:\Proyectos\Snacks\WLM\TaskManager\testImport\src\TaskManagerTypes\BasicTypes.xsd (The system cannot find the path specified) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225) at sun.reflect.GeneratedMethodAccessor302.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:665) at org.apache.xmlbeans.XmlBeans.compileXsd(XmlBeans.java:551) at org.netbeans.modules.wlm.project.anttasks.Util.writeXform(Util.java:432) ... 23 more BUILD FAILED (total time: 0 seconds) ------------------------------ The xsds are ok, if a copy the xsd in the WLM project an import the BasicType.xsd then all is ok but I need to import from an external project. I´m using for this project GlassFish ESB v2.1 release I attach a project example.
Created attachment 92027 [details] Test Projects
Alexey, please take a look.
Actually, this is caused by an invalid schemalocation in TestWLM.xsd, change to : <xsd:import schemaLocation="../../Test_WLM_BPEL/src/BasicTypes.xsd" namespace="http://xml.netbeans.org/schema/BasicTypes"/> solved the problem.
If I use the import schema: <xsd:import schemaLocation="../../Test_WLM_BPEL/src/BasicTypes.xsd" namespace="http://xml.netbeans.org/schema/BasicTypes"/> the project is build ok, but when I try to deploy the composite application to the GlassFish ESB I obtain an error: ---------------------------------- [deploy-service-assembly] Deploying a service assembly... host=localhost port=4848 file=E:\Proyectos\Snacks\WLM\TaskManager\TaskManagerServer/dist/TaskManagerServer.zip ERROR: Successful execution of Deploy: E:\Proyectos\Snacks\WLM\TaskManager\TaskManagerServer/dist/TaskManagerServer.zip WARNING: (JBIMA0404) La implementación del conjunto de servicios TaskManagerServer se ha realizado parcialmente; no se han podido implementar algunas unidades de servicio. * Component: sun-http-binding ERROR: (SOAPBC_DEPLOY_2) HTTPBC-E00201: Error en la implementación. javax.wsdl.WSDLException: WSDLException (at /definitions/types/xsd:schema/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at ''../../TaskManagerTypes/src/BasicTypes.xsd'', relative to ''file:/C:/GlassFishESBv21/glassfish/domains/domain1/jbi/service-assemblies/TaskManagerServer/TaskManagerServer-sun-http-binding/sun-http-binding/dummyTask/dummy.xsd''.: java.io.FileNotFoundException: This file was not found: file:/C:/GlassFishESBv21/glassfish/domains/domain1/jbi/service-assemblies/TaskManagerServer/TaskManagerServer-sun-http-binding/TaskManagerTypes/src/BasicTypes.xsd ------------------------------------- If I import the schema in a schema of a bpel project: <xsd:import schemaLocation="Test_WLM_BPEL/BasicTypes.xsd" namespace="http://xml.netbeans.org/schema/BasicTypes"/> and I use the bpel in a Composite Application the build and deploy is ok.
True, because the XSD is in another project and the deployment (inside GF) structure is different from the source code structure of the projects, The solution to this problem is to make each project self-contained. You can use absolute path to point to the xsd but it isn't a good idea because you may want to deploy to a remote machine. Make it an enhancement for this to use Catalog mechanism solving the reference issue