Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Exception when trying to generate xsd

Help
loomax
2004-10-14
2013-04-17
  • loomax
    loomax
    2004-10-14

    When I try to generate this xsd:

    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

      <xsd:element name="SONG" type="SongType"/>

      <xsd:complexType name="SongType">
        <xsd:sequence>
          <xsd:element name="TITLE" type="xsd:string"
                       minOccurs="1" maxOccurs="1"/>
          <xsd:element name="COMPOSER"  type="xsd:string"
                       minOccurs="1" maxOccurs="unbounded"/>
          <xsd:element name="PRODUCER"  type="xsd:string"
                       minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element name="PUBLISHER" type="xsd:string"
                       minOccurs="0" maxOccurs="1"/>
       
          <xsd:element name="LENGTH" type="xsd:duration"
                       minOccurs="0" maxOccurs="1"/>
          <xsd:element name="YEAR"   type="xsd:gYear"
                       minOccurs="1" maxOccurs="1"/>
     
          <xsd:element name="ARTIST" type="xsd:string"
                       minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>

    </xsd:schema>

    I get the followin log output:

    !ENTRY org.eclipse.core.runtime 4 2 Okt 14, 2004 10:49:31.530
    !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime".
    !STACK 0
    java.lang.NullPointerException
        at uk.ltd.grian.eclipse.xmlbeans.XMLBeansSchemaImpl.getName(XMLBeansSchemaImpl.java:191)
        at uk.ltd.grian.eclipse.xmlbeans.XMLBeanBuilder.build(XMLBeanBuilder.java:260)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:574)
        at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
        at org.eclipse.core.runtime.Platform.run(Platform.java:747)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:158)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:314)
        at org.eclipse.core.internal.resources.Project.build(Project.java:81)
        at uk.ltd.grian.eclipse.xmlbeans.popup.actions.Generate$1.run(Generate.java:112)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

    !ENTRY uk.ltd.grian.eclipse.xmlbeans 4 1 Okt 14, 2004 10:49:31.540
    !MESSAGE Exception in nature->run()
    !STACK 1
    org.eclipse.core.internal.resources.ResourceException: Errors during build.
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:316)
        at org.eclipse.core.internal.resources.Project.build(Project.java:81)
        at uk.ltd.grian.eclipse.xmlbeans.popup.actions.Generate$1.run(Generate.java:112)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
    !SUBENTRY 1 org.eclipse.core.resources 2 566 Okt 14, 2004 10:49:31.540
    !MESSAGE Errors during build.
    !SUBENTRY 2 uk.ltd.grian.eclipse.xmlbeans 2 75 Okt 14, 2004 10:49:31.540
    !MESSAGE Errors running builder "XMLBean Builder" on project XMLBeans.
    !SUBENTRY 2 uk.ltd.grian.eclipse.xmlbeans 2 75 Okt 14, 2004 10:49:31.540
    !MESSAGE java.lang.NullPointerException encountered while running XMLBean Builder.
    !STACK 0
    java.lang.NullPointerException
        at uk.ltd.grian.eclipse.xmlbeans.XMLBeansSchemaImpl.getName(XMLBeansSchemaImpl.java:191)
        at uk.ltd.grian.eclipse.xmlbeans.XMLBeanBuilder.build(XMLBeanBuilder.java:260)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:574)
        at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
        at org.eclipse.core.runtime.Platform.run(Platform.java:747)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:158)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:314)
        at org.eclipse.core.internal.resources.Project.build(Project.java:81)
        at uk.ltd.grian.eclipse.xmlbeans.popup.actions.Generate$1.run(Generate.java:112)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

     
    • loomax
      loomax
      2004-10-25

      do you have any idea about this or a similar problem ?

       
    • Don Stewart
      Don Stewart
      2004-10-29

      This seems quite a strange error. Can you tell me the file name of the schema. Also if possible could you send the file relating to this schema from the .metadata directory under your eclipse workspace. Under the .metadata directory you will see an XMLBeans plugin directory and under this a .projects directory. In .projects there will be a folder foir each Eclipse project. Under the project the schema was in there will be a .schemas directory. In this directory you will find a file for each schema you have tried to generate. Send the file with the highest number at the end. I know this is hard to read but it's something line the following:-
      \eclipse\workspace\.metadata\.plugins\uk.ltd.grian.eclipse.xmlbeans\.projects\ExampleXMLBeans\.schemas

      Many Thanks

       
    • loomax
      loomax
      2004-11-23

      I think something in the background was messed up -- After clicken clean ( some times ) now the generate selection works

       
    • Don Stewart
      Don Stewart
      2004-12-02

      There was a number of issues with 0.0.2 in reloading it's persistent properties.