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.
[ BUILD # : RC1 ] [ JDK VERSION : 1.6.0_07 ] I have just tried to generate an XML Document from a well formed XSD schema. I step through all pages of the New File Wizard until I get to the "XML Model Generation Options" page. On this page, I click the "Finish" button, but nothing happens.
Created attachment 72805 [details] Log File
Created attachment 72806 [details] Log File
Also see Exception 133653.
Created attachment 72808 [details] RC-1 Message Log (ignore others)
There was an error attaching log files. Correct log file for this issue is http://www.netbeans.org/nonav/issues/showattachment.cgi/72808/messages.log
Possibly related to the schema file not having a root node, then subsequently being edited to add the root node. Attempts to generate the file before the schema had a root node were canceled. NPE occurred on first and all subsequent attempts to generate XML file from XSD schema.
In fact, when the schema doesn't have a root element, you'll not be able to go to "model generation option" page. The next button in "schema option" panel gets enabled only when user selects a root node. You can try this by first creating a new schema file. OTOH, if I have a good schema, with top-level elements, I'm able to generate XML. So I do not think this qualifies to be a P1, unless you have a use-case that clearly doesn't work. Are you able to reproduce it? If yes, will you be able to share your schema?
*** Issue 151650 has been marked as a duplicate of this issue. ***
The issue is that I used the NetBeans XSD Editor to create the schema file using the following steps: 1) New XML Schema File 2) Create New Complex Element 3) Add Two Elements to the sequence within the Complex Element 4) Now try to create an XML file from the schema. At this point, the IDE is unable to create a new file because the XML Schema doesn't have a root element.
Samaresh, any update on this? Is Eric's usecase invalid or you can't reproduce it? Thanks for your evaluation!
When the schema doesn't have a top-level elements, IDE throws a message as shown in picture and this is what I'm getting.
Created attachment 73251 [details] no root message
I'm not sure what build Eric is using, but I'm using RC1. Let me add Tony, Michael and Sonali. They may be able to help ius out.
Eric, we've not been able to reproduce this as per your steps. So unless you provide more info on how to reproduce, I'll have to mark this as invalid.
I'm currently using 6.5 final with patches and it appears that the wizard has been fixed to keep the buttons disabled when the XSD file has no root element. Is there anything in the XSD editor that forces the inclusion of a root element on a well formed document?
i am also using 6.5 final version. I have a freeform java project, and in the project folder, there is a "schemas" folder containing quite a few schemas. All the schemas are related to each other. Now, I try to create a XML document through the following steps: 1> Select "XML Schema-Constrained Document" in the wizard. 2> Press "Next" to go to "Schema Options" 3> Click on the browse button, and select the required schema "By Namespace" 4> Click "Ok" to return to "Schema Options" screen 5> In the given table, under the "Primary" column, select the schema which was browsed earlier 6> Change the prefix to something meaningful (ns1 does not make any sense) 7> Click "Next" 8> No changes made to "XML Model Generations Options" screen. all default values used. 9> Clicking on "Finish" produces the said error.
Build: NetBeans IDE 6.5.1 (Build 200903060201) VM: Java HotSpot(TM) 64-Bit Server VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04 OS: Linux, 2.6.26-2-amd64, amd64 User Comments: Stacktrace: java.lang.NullPointerException at org.netbeans.modules.xml.wizard.XMLGeneratorVisitor.generateXML(XMLGeneratorVisitor.java:111) at org.netbeans.modules.xml.wizard.XMLGeneratorVisitor.generateXML(XMLGeneratorVisitor.java:138) at org.netbeans.modules.xml.wizard.impl.XMLWizardIterator.generateXMLBody(XMLWizardIterator.java:518) at org.netbeans.modules.xml.wizard.impl.XMLWizardIterator.writeXMLFile(XMLWizardIterator.java:654) at org.netbeans.modules.xml.wizard.impl.XMLWizardIterator.instantiate(XMLWizardIterator.java:238) at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:588)
Created attachment 82323 [details] stacktrace
This issue already has 8 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=133653
This issue already has 9 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=133653