[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with a NetcdfDataset

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: Re: help with a NetcdfDataset
  • Date: Fri, 03 Oct 2003 17:40:51 -0600

Viviane Vasconcellos de Menezes wrote:

John,

OK. I've wrote the path wrong in my last email, in my program it was OK: c:/../BFOR.nc.
I put the e.printStackTrace() and the following messages were done:

java.lang.NoSuchMethodError: ucar.nc2.Dimension.<init>(Ljava/lang/String;I)V
   at ucar.nc2.dataset.DimensionDS.<init>(DimensionDS.java:36)
   at ucar.nc2.dataset.NetcdfDataset.<init>(NetcdfDataset.java:179)
   at ucar.nc2.dataset.conv.Convention.factory(Convention.java:128)
   at teste.Application1.<init>(Application1.java:38)
   at teste.Application1.main(Application1.java:57)
Exception in thread "main"

C:\java\bin>java -jar "c:\toolkit\toolkit\teste\teste.jar"
Exception in thread "main" java.lang.NoClassDefFoundError: ucar.nc2.dataset.conv
.COARDSConvention
       at ucar.nc2.dataset.conv.Convention.class$(Convention.java:42)
       at ucar.nc2.dataset.conv.Convention.<clinit>(Convention.java:42)
       at teste.Application1.<init>(Application1.java:38)
       at teste.Application1.main(Application1.java:56)

I've tried with another nc file and the same have happen. I'm attaching the cdl from my nc file if you need it ... it have 17KB.

Thanks for your help

Viviane

somehow your classpath is wrong, perhaps how you built the "teste.jar". Try using the netcdf.jar in the classpath, and execute your main, eg:

 java -classpath netcdf.jar teste.Application1

see if you can get that working, then try building a jar that has everything in it.