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.
Open the attached project, and try to validate PDQSupplier.wsdl in the source directory. => java.lang.StackOverflowError at java.util.ArrayList.get(ArrayList.java:321) at java.util.AbstractList$Itr.next(AbstractList.java:422) at org.netbeans.modules.xml.xam.AbstractComponent.getChildren(AbstractComponent.java:197) at org.netbeans.modules.xml.schema.model.impl.SchemaImpl.getRedefines(SchemaImpl.java:314) at org.netbeans.modules.xml.schema.model.impl.SchemaModelImpl.getNotImportRefrences(SchemaModelImpl.java:227) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:245) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) at org.netbeans.modules.xml.schema.model.impl.resolver.ResolveSession.checkAllDependingModelsLoaded(ResolveSession.java:252) ......
Created attachment 90109 [details] a Java project containing one WSDL file and many XSD files
Created attachment 90110 [details] WSDL/XSD dependency map
Sergey, can you have someone look at this? Looks like caused by schema related changes.
Nikita, please take a look.
The exception happens because of cyclic include between voc.xsd, datatyps.xsd and datatypes-base.xsd Such dependency is acceptable. But unfortunately it comes to the error. But you can get rid of the exception if reorganize the includes. The man work is in trunk and the issue can be reproduced there as well. So I change mailstone to 6.8
Yes, I see the cyclic include among voc.xsd, datatyps.xsd and datatypes-base.xsd. However, if you try to validate any one of them, it validates OK. All those xsds in the attached project come from the HL7 standard and can't be changed or re-orged. I think this is a kinda stopper for the HealthCarePack which is based on NetBeans 6.7.1, so I think the fix should be back-ported to 6.7.1.
Fixed in trunk http://hg.netbeans.org/main/rev/d02e798c40aa A new JUnit test is added to ScehmaModelResolverTest.java I agree. It definitely has to be migrated to 6.7.1 The reason why the validation for XSD works well is because the validation for XSD and WSDL work different ways. The XSD validation uses only a SAX parser. A schema is considered correct if it has been managed to parse it successfully. But the WSDL validation tries resolving types of message parts. It uses more complex approaches of resolving (so called "mega include"), which tries resolving implicit inclusions. You can find some details in the issue #122836 and also in comments for method IncludeResolver.getMegaIncludedModels(...)
Integrated into 'main-golden', will be available in build *200910290252* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/d02e798c40aa User: supernikita@netbeans.org Log: #175481 - StackOverflowError when validating WSDL file
Tested in 6.8 nightly and I don't see the StackOverflowError anymore. One thing to note is that I had to add xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/" to the <definitions> element to validate the WSDL. The following is the output: XML validation started. Checking file:/C:/temp/175481/src/PDQSupplier.wsdl... Referenced entity at "http://schemas.xmlsoap.org/wsdl/". XML validation finished. Without the xsi:schemaLocation definition, I got the following: XML validation started. Checking file:/C:/temp/175481/src/PDQSupplier.wsdl... cvc-elt.1: Cannot find the declaration of element 'definitions'. [9] XML validation finished. Maybe the system catalog in NetBeans 6.8 is different somehow?
The fix has been ported into the release67_fixes repository. http://hg.netbeans.org/release67_fixes/rev/57e28111c50d
Followed the following instructions from Nikita and it worked OK in NetBeans 6.7. 1) Download and install full version of NetBeans 6.7 http://www.netbeans.org/downloads/6.7/index.html 2) Run the IDE. 3) Select menu Tools -> Plugins. 4) Click on the tab Updates and apply all available updates. 5) Restart NetBeans and do steps 3, 4, 5 again while there isn't updates remain. 6) Check if the "XML Schema and WSDL" plugin is installed. Install it if necessary (from Available Plugins tab) Now your NetBeans has to be almost up to date, but only without latest patches. To install the latest once follow the next steps: 7) Select the tab Settings in the Plugins dialog. 8) Click on the button Add, copy/paste the URL http://smetiste.czech.sun.com/builds/netbeans/6.7.1/fixes/2009-11-04_18-04-21/ml/uc/catalog.xml.gz into the URL Textbox and click on the OK button. 9) A new updates has to appear in the Update tab. Apply them and restart NetBeans. Now you can start testing.