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.

Bug 161985 - NullPointerException at org.netbeans.modules.xml.schema.model.impl.SchemaComponentImpl.populateChildren
Summary: NullPointerException at org.netbeans.modules.xml.schema.model.impl.SchemaComp...
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Model (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-05 14:11 UTC by boucherb
Modified: 2015-09-17 14:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 147165


Attachments
stacktrace (6.21 KB, text/plain)
2009-04-05 14:11 UTC, boucherb
Details
stacktrace (6.29 KB, text/plain)
2010-09-15 17:35 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description boucherb 2009-04-05 14:11:34 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Windows XP, 5.1, x86

User Comments:
boucherb: Assigning a predefined simple type as the 'structure' of a direct attribute of an inline complex type in a global schema element.



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.xml.schema.model.impl.SchemaComponentImpl.populateChildren(SchemaComponentImpl.java:101)
        at org.netbeans.modules.xml.xam.AbstractComponent._getChildren(AbstractComponent.java:154)
        at org.netbeans.modules.xml.xam.AbstractComponent.getChildren(AbstractComponent.java:138)
        at org.netbeans.modules.xml.schema.model.visitor.DeepSchemaVisitor.visitChildren(DeepSchemaVisitor.java:266)
        at org.netbeans.modules.xml.schema.model.visitor.DeepSchemaVisitor.visit(DeepSchemaVisitor.java:54)
        at org.netbeans.modules.xml.schema.model.impl.LocalSimpleTypeImpl.accept(LocalSimpleTypeImpl.java:76)
Comment 1 boucherb 2009-04-05 14:11:42 UTC
Created attachment 79467 [details]
stacktrace
Comment 2 Sergey Lunegov 2009-04-06 08:46:17 UTC
Please provide exact steps to reproduce the issue.
Comment 3 dcherk 2009-11-17 10:32:07 UTC
here's the structure that resulted in the NPE for me:

  <xs:element name="userOrderBy">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="field" minOccurs="1" maxOccurs="1">
          <xs:complexType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="userId"/>
              <xs:enumeration value="name"/>
              <xs:enumeration value="email"/>
              <xs:enumeration value="employeeNumber"/>
              <xs:enumeration value="departureDate"/>
              <xs:enumeration value="lastLoginDateTime"/>
              <xs:enumeration value="supervisorUserId"/>
              <xs:enumeration value="supervisorName"/>
              <xs:enumeration value="supervisorEmail"/>
              <xs:enumeration value="supervisorEmployeeNumber"/>
            </xs:restriction>
            <xs:attribute ref="rram:sortDirection" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

Its obviously incorrect, and validation errors should have happened.
Comment 4 Sergey Lunegov 2009-11-18 01:33:38 UTC
Would you please attach the whole schema.
Comment 5 Michel Graciano 2010-09-15 17:35:50 UTC
Created attachment 102034 [details]
stacktrace
Comment 6 Martin Balin 2015-09-17 14:04:12 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.