NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdf-java] BUG: NcMLReader can't process nested Group

  • To: Christian D Ward-Garrison <cwardgar@xxxxxxxx>
  • Subject: Re: [netcdf-java] BUG: NcMLReader can't process nested Group
  • From: John Caron <caron@xxxxxxxxxxxxxxxx>
  • Date: Wed, 07 Jul 2010 10:26:58 -0600
Christian D Ward-Garrison wrote:

  In NJ 4.2.20100527.2031:

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
    <group name="group1">
        <group name="group2">
            <dimension name="foo" length="5" />
        </group>
    </group>
</netcdf>

causes:

Exception in thread "main" java.lang.NullPointerException
        at ucar.nc2.ncml.NcMLReader.readGroup(NcMLReader.java:731)
        at ucar.nc2.ncml.NcMLReader.readGroup(NcMLReader.java:781)
        at ucar.nc2.ncml.NcMLReader.readGroup(NcMLReader.java:781)
        at ucar.nc2.ncml.NcMLReader.readNetcdf(NcMLReader.java:489)
        at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:431)
        at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:252)
        at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:202)
at ucar.nc2.dataset.NetcdfDataset.acquireNcml(NetcdfDataset.java:801) at ucar.nc2.dataset.NetcdfDataset.openOrAcquireFile(NetcdfDataset.java:677) at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:434) at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:417) at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:402) at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:389)
        at gov.usgs.shodan.Mlar.main(Mlar.java:13)

That's valid NcML, right?

Regards,
Christian Ward-Garrison

Hi Christian:

ok, i have a fix for this, i will get a new release asap.
thanks for reporting,

john



  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: