Opening nc.zip files
Ethan Davis
edavis at unidata.ucar.edu
Thu May 24 09:39:18 MDT 2007
Hi Pauline,
I think you have an old version of the grib-*.jar library on your
classpath before the netcdf-*.jar file. The
ucar.unidata.io.RandomAccessFile class is distributed in both library
files and if those two libraries aren't in sync it can cause trouble.
The versions in netcdfAll-2.2.20.zip should match up. Here's the version
info from the grib jar file:
Built-On: 2007-05-15 13:13:58
Implementation-Version: 5.1.03
Ethan
Pauline Mak wrote:
> Hi all,
>
> I'm having trouble trying to open a nc.zip file. I'm using the latest
> version of the NetCDF library (netCDF 2.2.20). Do I need to download
> another library for the getRandomAccessFile method?
>
> When I open it, I get the following error message:
>
> Exception in thread "main" java.lang.NoSuchMethodError:
> ucar.unidata.io.RandomAccessFile.getRandomAccessFile()Ljava/io/RandomAccessFile;
> at
> ucar.nc2.iosp.dorade.Doradeheader.isValidFile(Doradeheader.java:48)
> at ucar.nc2.iosp.dorade.Doradeiosp.isValidFile(Doradeiosp.java:60)
> at ucar.nc2.NetcdfFile.open(NetcdfFile.java:426)
> at ucar.nc2.NetcdfFile.open(NetcdfFile.java:261)
> at ucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:341)
> at
> ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:175)
> at
> ucar.nc2.dataset.NetcdfDatasetCache.acquire(NetcdfDatasetCache.java:203)
> at
> ucar.nc2.dataset.NetcdfDatasetCache.acquire(NetcdfDatasetCache.java:183)
> at
> ucar.nc2.dataset.NetcdfDatasetCache.acquire(NetcdfDatasetCache.java:171)
> at ucar.nc2.dt.grid.GridDataset.open(GridDataset.java:71)
> at au.org.tpac.test.TestCDM_Main.doFile(Unknown Source)
> .....
>
> Interestingly, it works fine on TDS - when I browse for the file in TDS,
> it's able to show all the attributes of the files. In fact, the file
> doesn't even show up a zip file. Maybe there's another magical method
> for opening the file? I'm opening files using the method:
>
> GridDataset.open ("file:///" + dirName);
>
> Thanks for any help in advance :)
>
> Cheers,
>
> -Pauline.
>
>
>
> ==============================================================================
> To unsubscribe netcdf-java, visit:
> http://www.unidata.ucar.edu/mailing-list-delete-form.html
> ==============================================================================
>
--
Ethan R. Davis Telephone: (303) 497-8155
Software Engineer Fax: (303) 497-8690
UCAR Unidata Program Center E-mail: edavis at ucar.edu
P.O. Box 3000
Boulder, CO 80307-3000 http://www.unidata.ucar.edu/
---------------------------------------------------------------------------
==============================================================================
To unsubscribe netcdf-java, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================
More information about the Netcdf-java
mailing list