In EMF, you can use XML schema to define the model and then convert it to the genmodel model. However, after I load the fourth step of the genmodel wizard, an nullpointerexception is generated as follows, leading to the inability to continue:
Java. Lang. nullpointerexception
At org. Apache. Crimson. Tree. elementnode2.getattributenodens (elementnode2.java: 432 )
At org. Apache. Crimson. Tree. elementnode2.hasattributens (elementnode2.java: 388 )
At org. Eclipse. XSD. ecore. xsdecorebuilder. getecoreattribute (xsdecorebuilder. Java: 2336 )
At org. Eclipse. XSD. ecore. xsdecorebuilder. getecoreattribute (xsdecorebuilder. Java: 2329 )
At org. Eclipse. XSD. ecore. xsdecorebuilder. getestructuralfeature (xsdecorebuilder. Java: 2004 )
At org. Eclipse. XSD. ecore. xsdecorebuilder. Generate (xsdecorebuilder. Java: 2117 )
At org. Eclipse. XSD. ecore. xsdecorebuilder. Generate (xsdecorebuilder. Java: 2067 )
At org. Eclipse. XSD. ecore. Importer. xsdimporter. docomputeepackages (xsdimporter. Java: 123 )
At org. Eclipse. EMF. Importer. modelimporter. computeepackages (modelimporter. Java: 664 )
At org. Eclipse. EMF. Importer. UI. contribution. Base. modeldetailpage. refreshmodel (modeldetailpage. Java: 488 )
At org. Eclipse. EMF. Importer. UI. contribution. Base. modeldetailpage $ 2 . Execute (modeldetailpage. Java: 434 )
At org. Eclipse. UI. Actions. workspacemodifyoperation $ 1 . Run (workspacemodifyoperation. Java: 98 )
At org. Eclipse. Core. Internal. Resources. workspace. Run (workspace. Java: 1719 )
At org. Eclipse. UI. Actions. workspacemodifyoperation. Run (workspacemodifyoperation. Java: 110 )
At org. Eclipse. jface. Operation. modalcontext. runincurrentthread (modalcontext. Java: 346 )
At org. Eclipse. jface. Operation. modalcontext. Run (modalcontext. Java: 291 )
At org. Eclipse. jface. Wizard. wizarddialog. Run (wizarddialog. Java: 830 )
At org. Eclipse. EMF. Importer. UI. contribution. Base. modeldetailpage. refreshmodel (modeldetailpage. Java: 457 )
At org. Eclipse. EMF. Importer. UI. contribution. Base. modeldetailpage. dohandleevent (modeldetailpage. Java: 241 )
At org. Eclipse. XSD. ecore. Importer. UI. xsddetailpage. dohandleevent (xsddetailpage. Java: 91 )
At org. Eclipse. EMF. Importer. UI. contribution. Base. modelimporterpage. handleevent (modelimporterpage. Java: 106 )
At org. Eclipse. SWT. Widgets. eventtable. sendevent (eventtable. Java: 66 )
At org. Eclipse. SWT. Widgets. widget. sendevent (widget. Java: 1021 )
At org. Eclipse. SWT. Widgets. display. rundeferredevents (display. Java: 2867 )
At org. Eclipse. SWT. Widgets. display. readanddispatch (display. Java: 2572 )
At org. Eclipse. jface. Window. Window. runeventloop (window. Java: 809 )
At org. Eclipse. jface. Window. Window. Open (window. Java: 787 )
At org. Eclipse. UI. Actions. newwizardaction. Run (newwizardaction. Java: 181 )
At org. Eclipse. UI. Actions. newwizarddropdownaction. Run (newwizarddropdownaction. Java: 174 )
At org. Eclipse. jface. action. Action. runwithevent (action. Java: 996 )
At org. Eclipse. jface. Action. actioncontributionitem. handlewidgetselection (actioncontributionitem. Java: 538 )
At org. Eclipse. jface. Action. actioncontributionitem. Access $ 2 (Actioncontributionitem. Java: 488 )
At org. Eclipse. jface. Action. actioncontributionitem $ 6 . Handleevent (actioncontributionitem. Java: 441 )
At org. Eclipse. SWT. Widgets. eventtable. sendevent (eventtable. Java: 66 )
At org. Eclipse. SWT. Widgets. widget. sendevent (widget. Java: 1021 )
At org. Eclipse. SWT. Widgets. display. rundeferredevents (display. Java: 2867 )
At org. Eclipse. SWT. Widgets. display. readanddispatch (display. Java: 2572 )
At org. Eclipse. UI. Internal. workbench. runeventloop (workbench. Java: 1699 )
At org. Eclipse. UI. Internal. workbench. runui (workbench. Java: 1663 )
At org. Eclipse. UI. Internal. workbench. createandrunworkbench (workbench. Java: 367 )
At org. Eclipse. UI. platformui. createandrunworkbench (platformui. Java: 143 )
At org. Eclipse. UI. Internal. Ide. ideapplication. Run (ideapplication. Java: 103 )
At org. Eclipse. Core. Internal. runtime. platformactivator $ 1 . Run (platformactivator. Java: 226 )
At org. Eclipse. Core. runtime. adaptor. eclipsestarter. Run (eclipsestarter. Java: 376 )
At org. Eclipse. Core. runtime. adaptor. eclipsestarter. Run (eclipsestarter. Java: 163 )
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (nativemethodaccessorimpl. Java: 39 )
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (delegatingmethodaccessorimpl. Java: 25 )
At java. Lang. Reflect. method. Invoke (method. Java: 324 )
At org. Eclipse. Core. launcher. Main. invokeframework (main. Java: 334 )
At org. Eclipse. Core. launcher. Main. basicrun (main. Java: 278 )
At org. Eclipse. Core. launcher. Main. Run (main. Java: 973 )
At org. Eclipse. Core. launcher. Main. Main (main. Java: 948 )
This is caused by a bug in Sun jdk1.4. The solution is to use third-party XML
Parser, for example, xerces-J. Download xerces-J and decompress it. Then, add "-vmargs" to the startup parameters of Eclipse.
-Djava. endorsed. dirs = <path-to-your-xerces-jars-Folder>.
EMF instructions on this issue: XSD model loading: crimson Dom bug, workaround & download