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] NoSuchMethodError

Now I'm confused. I looked at the 5.5.1 release notes
https://github.com/Unidata/netcdf-java/releases/tag/v5.5.1 . It
specifically says you still support Java 8 (and will try to until
netcdf-java v6) and that you tested with Temurin 8 from the (Eclipse
Adoptium project), which is what I test with.

And I'll add that my tests found some additional problems similar to the
one I reported previously:

Caused by: java.lang.NoSuchMethodError:
java.nio.ShortBuffer.position(I)Ljava/nio/ShortBuffer;
 at ucar.nc2.iosp.IospHelper.readData(IospHelper.java:335)
 at ucar.nc2.iosp.IospHelper.readDataFill(IospHelper.java:288)
 at ucar.nc2.internal.iosp.hdf4.H4iosp.readData(H4iosp.java:168)
...

Caused by: java.lang.NoSuchMethodError:
java.nio.FloatBuffer.position(I)Ljava/nio/FloatBuffer;
 at ucar.nc2.iosp.IospHelper.readData(IospHelper.java:367)
 at ucar.nc2.iosp.IospHelper.readDataFill(IospHelper.java:288)
 at ucar.nc2.internal.iosp.hdf5.H5iospNew.readData(H5iospNew.java:226)
...

 Thanks for looking into this.


On Wed, Dec 22, 2021 at 8:58 AM Bob Simons - NOAA Federal <
bob.simons@xxxxxxxx> wrote:

> (Sorry for so many emails lately.)
>
> I installed netcdfAll 5.5.1. It compiles. But when I ran my regression
> tests last night, my saveAsGeotiff method failed with
>
> java.lang.NoSuchMethodError:
> java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
>  at ucar.nc2.geotiff.GeoTiff.writeHeader(GeoTiff.java:250)
>  at ucar.nc2.geotiff.GeoTiff.writeMetadata(GeoTiff.java:227)
>  at ucar.nc2.geotiff.GeotiffWriter.writeMetadata(GeotiffWriter.java:261)
>  at ucar.nc2.geotiff.GeotiffWriter.writeGrid(GeotiffWriter.java:155)
>  at ucar.nc2.geotiff.GeotiffWriter.writeGrid(GeotiffWriter.java:101)
>
> When I look in the Java 8 documentation (which I'm still using as it has
> Long Term Support), I don't see a flip() method. With 5.5.1, are you
> stopping support for Java 8? What version of Java is now recommended?  Or
> do you think the error message has some other cause?
>
> (I know I'm old, but I liked it when the compiler could tell me if my code
> was basically valid and all the needed components were present. With the
> current trends (in other code, too) I need extensive regression tests to
> check that everything still works when I update libraries. And even then, I
> am much less confident.)
>
>
>
  • 2021 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: