NetCDF: NoSuchFieldError: pdsHash when opening a file

NetCDF: NoSuchFieldError: pdsHash when opening a file

我正在尝试使用 NetcdfDataset.openDataset()

打开 grib2 文件
val path= getClass.getResource("/grib2/weather.grib2").getPath
val gribFile = NetcdfDataset.openDataset(path)

我遇到了 NoSuchFieldError: pdsHash。这是否意味着该文件无效?如果没有那怎么打开呢?

解决方案是安装 netcdfAll 而不是 netcdf-java

  "edu.ucar" % "netcdfAll" % "4.6.3"