Home » Archived » XML Schema Definition (XSD) » NullPointerException in XSDECoreBuilder 
| NullPointerException in XSDECoreBuilder [message #49555] | 
Tue, 27 July 2004 13:33   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi there. I've been given a pretty large schema, distributed among a large 
number of files. No validation errors are reported on the file that 
represents the "root" of the schema. However, when I try to create a new 
EMF project from that schema, I get the stack trace shown below. 
 
After taking a look at XSDECoreBuilder under the debugger, it looks as if 
the failure is occurring on an attribute that is or extends a type 
("lang","space") from the xml namespace 
(http://www.w3.org/XML/1998/namespace). 
 
Given the size of what I'm looking at, it's been hard to narrow it down 
much more. I'm wondering if anyone's seen something like this before, any 
hint would be good. Or, maybe someone on the xsd development team could 
have a look at the xsd files i'm working with... Thanks! 
 
P.S. i'm using the 2.0.0 versions of both emf & xsd. and yes, the library 
example works fine for me, and i'm using an ibm jre :-) 
 
 
java.lang.reflect.InvocationTargetException 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
at java.lang.reflect.Method.invoke(Method.java:386) 
at 
 org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
at 
 org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
at 
 org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
at 
 org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
at 
 org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
at 
 org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
Code)) 
at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
Code)) 
at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
Code)) 
at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
Code)) 
at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
at org.eclipse.jface.window.Window.open(Window.java:648) 
at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
at 
 org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
at 
 org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
at 
 org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
Code)) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
Code)) 
at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
at 
 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
at 
 org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
at 
 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
at 
 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
at java.lang.reflect.Method.invoke(Method.java:386) 
at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
at org.eclipse.core.launcher.Main.run(Main.java:644) 
at org.eclipse.core.launcher.Main.main(Main.java:628) 
Caused by: java.lang.NullPointerException 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
... 44 more 
Root exception: 
java.lang.NullPointerException 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
at 
 org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
at java.lang.reflect.Method.invoke(Method.java:386) 
at 
 org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
at 
 org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
at 
 org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
at 
 org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
at 
 org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
at 
 org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
Code)) 
at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
Code)) 
at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
Code)) 
at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
Code)) 
at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
at org.eclipse.jface.window.Window.open(Window.java:648) 
at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
at 
 org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
at 
 org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
at 
 org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
Code)) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
Code)) 
at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
at 
 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
at 
 org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
at 
 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
at 
 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
at java.lang.reflect.Method.invoke(Method.java:386) 
at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
at org.eclipse.core.launcher.Main.run(Main.java:644) 
at org.eclipse.core.launcher.Main.main(Main.java:628)
 |  
 |  
  |  
| Re: NullPointerException in XSDECoreBuilder [message #49675 is a reply to message #49555] | 
Wed, 28 July 2004 09:10    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: merks.ca.ibm.com 
 
Hi, 
 
If you make your schemas available, I'll try them out and fix any  
problem I can reproduce.  If the schemas are confidential, you can send  
them to me directly, rather than posting them in public. 
 
 
jjk wrote: 
 
>Hi there. I've been given a pretty large schema, distributed among a large 
>number of files. No validation errors are reported on the file that 
>represents the "root" of the schema. However, when I try to create a new 
>EMF project from that schema, I get the stack trace shown below. 
> 
>After taking a look at XSDECoreBuilder under the debugger, it looks as if 
>the failure is occurring on an attribute that is or extends a type 
>("lang","space") from the xml namespace 
>(http://www.w3.org/XML/1998/namespace). 
> 
>Given the size of what I'm looking at, it's been hard to narrow it down 
>much more. I'm wondering if anyone's seen something like this before, any 
>hint would be good. Or, maybe someone on the xsd development team could 
>have a look at the xsd files i'm working with... Thanks! 
> 
>P.S. i'm using the 2.0.0 versions of both emf & xsd. and yes, the library 
>example works fine for me, and i'm using an ibm jre :-) 
> 
> 
>java.lang.reflect.InvocationTargetException 
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
>at java.lang.reflect.Method.invoke(Method.java:386) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
>at 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
>at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
>at 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
>at 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
>at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
>at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
>at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
>at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
>Code)) 
>at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
>at org.eclipse.jface.window.Window.open(Window.java:648) 
>at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
>at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
>at 
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
>at 
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
>at 
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
>at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
>Code)) 
>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
>at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
>at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
>Code)) 
>at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
>at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
>at 
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
>at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
>at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
>at 
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
>at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
>at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
>at java.lang.reflect.Method.invoke(Method.java:386) 
>at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
>at org.eclipse.core.launcher.Main.run(Main.java:644) 
>at org.eclipse.core.launcher.Main.main(Main.java:628) 
>Caused by: java.lang.NullPointerException 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
>.. 44 more 
>Root exception: 
>java.lang.NullPointerException 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
>at java.lang.reflect.Method.invoke(Method.java:386) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
>at 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
>at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
>at 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
>at 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
>at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
>at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
>at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
>at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
>Code)) 
>at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
>at org.eclipse.jface.window.Window.open(Window.java:648) 
>at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
>at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
>at 
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
>at 
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
>at 
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
>at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
>Code)) 
>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
>at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
>at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
>Code)) 
>at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
>at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
>at 
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
>at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
>at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
>at 
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
>at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
>at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
>at java.lang.reflect.Method.invoke(Method.java:386) 
>at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
>at org.eclipse.core.launcher.Main.run(Main.java:644) 
>at org.eclipse.core.launcher.Main.main(Main.java:628) 
> 
>   
>
 |  
 |  
  |  
| Re: NullPointerException in XSDECoreBuilder [message #49705 is a reply to message #49675] | 
Thu, 29 July 2004 16:44   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Thanks Ed. I've opened a bug with a more-digestible sample than my 
original: https://bugs.eclipse.org/bugs/show_bug.cgi?id=71116 
 
 
Ed Merks wrote: 
 
> Hi, 
 
> If you make your schemas available, I'll try them out and fix any  
> problem I can reproduce.  If the schemas are confidential, you can send  
> them to me directly, rather than posting them in public. 
 
 
> jjk wrote: 
 
> >Hi there. I've been given a pretty large schema, distributed among a large 
> >number of files. No validation errors are reported on the file that 
> >represents the "root" of the schema. However, when I try to create a new 
> >EMF project from that schema, I get the stack trace shown below. 
> > 
> >After taking a look at XSDECoreBuilder under the debugger, it looks as if 
> >the failure is occurring on an attribute that is or extends a type 
> >("lang","space") from the xml namespace 
> >(http://www.w3.org/XML/1998/namespace). 
> > 
> >Given the size of what I'm looking at, it's been hard to narrow it down 
> >much more. I'm wondering if anyone's seen something like this before, any 
> >hint would be good. Or, maybe someone on the xsd development team could 
> >have a look at the xsd files i'm working with... Thanks! 
> > 
> >P.S. i'm using the 2.0.0 versions of both emf & xsd. and yes, the library 
> >example works fine for me, and i'm using an ibm jre :-) 
> > 
> > 
> >java.lang.reflect.InvocationTargetException 
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >at 
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
> >at 
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
> >at java.lang.reflect.Method.invoke(Method.java:386) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
> >at 
> 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
> >at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
> >at 
> 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
> >at 
> 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
> >at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
> >at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
> >at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
> >at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
> >Code)) 
> >at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
> >at org.eclipse.jface.window.Window.open(Window.java:648) 
> >at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
> >at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
> >at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
> >Code)) 
> >at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
> >at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
> >at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
> >Code)) 
> >at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
> >at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
> >at 
> > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
> >at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
> >at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
> >at 
> 
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
> >at 
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
> >at 
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >at 
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
> >at 
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
> >at java.lang.reflect.Method.invoke(Method.java:386) 
> >at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
> >at org.eclipse.core.launcher.Main.run(Main.java:644) 
> >at org.eclipse.core.launcher.Main.main(Main.java:628) 
> >Caused by: java.lang.NullPointerException 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
> >.. 44 more 
> >Root exception: 
> >java.lang.NullPointerException 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >at 
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
> >at 
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
> >at java.lang.reflect.Method.invoke(Method.java:386) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
> >at 
> 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
> >at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
> >at 
> 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
> >at 
> 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
> >at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
> >at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
> >at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
> >at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
> >Code)) 
> >at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
> >at org.eclipse.jface.window.Window.open(Window.java:648) 
> >at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
> >at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
> >at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
> >Code)) 
> >at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
> >at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
> >at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
> >Code)) 
> >at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
> >at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
> >at 
> > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
> >at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
> >at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
> >at 
> 
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
> >at 
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
> >at 
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >at 
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
> >at 
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
> >at java.lang.reflect.Method.invoke(Method.java:386) 
> >at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
> >at org.eclipse.core.launcher.Main.run(Main.java:644) 
> >at org.eclipse.core.launcher.Main.main(Main.java:628) 
> > 
> >   
> >
 |  
 |  
  |  
| Re: NullPointerException in XSDECoreBuilder [message #589961 is a reply to message #49555] | 
Wed, 28 July 2004 09:10   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi, 
 
If you make your schemas available, I'll try them out and fix any  
problem I can reproduce.  If the schemas are confidential, you can send  
them to me directly, rather than posting them in public. 
 
 
jjk wrote: 
 
>Hi there. I've been given a pretty large schema, distributed among a large 
>number of files. No validation errors are reported on the file that 
>represents the "root" of the schema. However, when I try to create a new 
>EMF project from that schema, I get the stack trace shown below. 
> 
>After taking a look at XSDECoreBuilder under the debugger, it looks as if 
>the failure is occurring on an attribute that is or extends a type 
>("lang","space") from the xml namespace 
>(http://www.w3.org/XML/1998/namespace). 
> 
>Given the size of what I'm looking at, it's been hard to narrow it down 
>much more. I'm wondering if anyone's seen something like this before, any 
>hint would be good. Or, maybe someone on the xsd development team could 
>have a look at the xsd files i'm working with... Thanks! 
> 
>P.S. i'm using the 2.0.0 versions of both emf & xsd. and yes, the library 
>example works fine for me, and i'm using an ibm jre :-) 
> 
> 
>java.lang.reflect.InvocationTargetException 
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
>at java.lang.reflect.Method.invoke(Method.java:386) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
>at 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
>at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
>at 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
>at 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
>at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
>at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
>at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
>at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
>Code)) 
>at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
>at org.eclipse.jface.window.Window.open(Window.java:648) 
>at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
>at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
>at 
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
>at 
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
>at 
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
>at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
>Code)) 
>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
>at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
>at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
>Code)) 
>at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
>at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
>at 
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
>at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
>at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
>at 
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
>at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
>at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
>at java.lang.reflect.Method.invoke(Method.java:386) 
>at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
>at org.eclipse.core.launcher.Main.run(Main.java:644) 
>at org.eclipse.core.launcher.Main.main(Main.java:628) 
>Caused by: java.lang.NullPointerException 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
>.. 44 more 
>Root exception: 
>java.lang.NullPointerException 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
>at 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
>at java.lang.reflect.Method.invoke(Method.java:386) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
>at 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
>at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
>at 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
>at 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
>at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
>at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
>at 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
>at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
>at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
>Code)) 
>at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
>Code)) 
>at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
>at org.eclipse.jface.window.Window.open(Window.java:648) 
>at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
>at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
>at 
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
>at 
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
>at 
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
>at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
>Code)) 
>at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
>at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
>at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
>Code)) 
>at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
>at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
>at 
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
>at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
>at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
>at 
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
>at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
>at 
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
>at java.lang.reflect.Method.invoke(Method.java:386) 
>at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
>at org.eclipse.core.launcher.Main.run(Main.java:644) 
>at org.eclipse.core.launcher.Main.main(Main.java:628) 
> 
>   
>
 |  
 |  
  |  
| Re: NullPointerException in XSDECoreBuilder [message #589971 is a reply to message #49675] | 
Thu, 29 July 2004 16:44   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Thanks Ed. I've opened a bug with a more-digestible sample than my 
original: https://bugs.eclipse.org/bugs/show_bug.cgi?id=71116 
 
 
Ed Merks wrote: 
 
> Hi, 
 
> If you make your schemas available, I'll try them out and fix any  
> problem I can reproduce.  If the schemas are confidential, you can send  
> them to me directly, rather than posting them in public. 
 
 
> jjk wrote: 
 
> >Hi there. I've been given a pretty large schema, distributed among a large 
> >number of files. No validation errors are reported on the file that 
> >represents the "root" of the schema. However, when I try to create a new 
> >EMF project from that schema, I get the stack trace shown below. 
> > 
> >After taking a look at XSDECoreBuilder under the debugger, it looks as if 
> >the failure is occurring on an attribute that is or extends a type 
> >("lang","space") from the xml namespace 
> >(http://www.w3.org/XML/1998/namespace). 
> > 
> >Given the size of what I'm looking at, it's been hard to narrow it down 
> >much more. I'm wondering if anyone's seen something like this before, any 
> >hint would be good. Or, maybe someone on the xsd development team could 
> >have a look at the xsd files i'm working with... Thanks! 
> > 
> >P.S. i'm using the 2.0.0 versions of both emf & xsd. and yes, the library 
> >example works fine for me, and i'm using an ibm jre :-) 
> > 
> > 
> >java.lang.reflect.InvocationTargetException 
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >at 
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
> >at 
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
> >at java.lang.reflect.Method.invoke(Method.java:386) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
> >at 
> 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
> >at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
> >at 
> 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
> >at 
> 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
> >at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
> >at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
> >at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
> >at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
> >Code)) 
> >at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
> >at org.eclipse.jface.window.Window.open(Window.java:648) 
> >at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
> >at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
> >at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
> >Code)) 
> >at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
> >at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
> >at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
> >Code)) 
> >at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
> >at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
> >at 
> > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
> >at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
> >at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
> >at 
> 
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
> >at 
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
> >at 
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >at 
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
> >at 
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
> >at java.lang.reflect.Method.invoke(Method.java:386) 
> >at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
> >at org.eclipse.core.launcher.Main.run(Main.java:644) 
> >at org.eclipse.core.launcher.Main.main(Main.java:628) 
> >Caused by: java.lang.NullPointerException 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
> >.. 44 more 
> >Root exception: 
> >java.lang.NullPointerException 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.initialize(XSDEcoreBui lder.java:1550) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.createFeature(XSDEcore Builder.java:1428) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:1118) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:728) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClass(XSDEcore Builder.java:950) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.computeEClassifier(XSD EcoreBuilder.java:333) 
> >at 
> 
> org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:285) 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1946) 
> >at 
> > org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:1875) 
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >at 
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
> >at 
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
> >at java.lang.reflect.Method.invoke(Method.java:386) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$20.execute(EMFProjectWizard.java:1607) 
> >at 
> 
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:91) 
> >at  org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673) 
> >at 
> 
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOperation.java:105) 
> >at 
> 
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:303) 
> >at  org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253) 
> >at  org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java: 752) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$XMLSchemaModelPage.refreshXMLSchemaModel(EMFProject Wizard.java:1677) 
> >at 
> 
> org.eclipse.emf.codegen.ecore.genmodel.presentation.EMFProje ctWizard$16.widgetSelected(EMFProjectWizard.java:1456) 
> >at  org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89) 
> >at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compiled 
> >Code)) 
> >at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
> >Code)) 
> >at  org.eclipse.jface.window.Window.runEventLoop(Window.java:668 ) 
> >at org.eclipse.jface.window.Window.open(Window.java:648) 
> >at  org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction .java:111) 
> >at  org.eclipse.jface.action.Action.runWithEvent(Action.java:881 ) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866) 
> >at 
> 
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785) 
> >at  org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled 
> >Code)) 
> >at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) 
> >at  org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772) 
> >at  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled 
> >Code)) 
> >at  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377) 
> >at  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) 
> >at 
> > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254) 
> >at  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141) 
> >at  org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96) 
> >at 
> 
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335) 
> >at 
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273) 
> >at 
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129) 
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >at 
> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79) 
> >at 
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41) 
> >at java.lang.reflect.Method.invoke(Method.java:386) 
> >at org.eclipse.core.launcher.Main.basicRun(Main.java:183) 
> >at org.eclipse.core.launcher.Main.run(Main.java:644) 
> >at org.eclipse.core.launcher.Main.main(Main.java:628) 
> > 
> >   
> >
 |  
 |  
  |   
Goto Forum:
 
 Current Time: Tue Nov 04 03:43:12 EST 2025 
 Powered by  FUDForum. Page generated in 0.04588 seconds  
 |