Task #6853 (closed)
Opened 8 years ago
Closed 6 years ago
Upgrade NetCDF
| Reported by: | jamoore | Owned by: | mlinkert |
|---|---|---|---|
| Priority: | major | Milestone: | Unscheduled |
| Component: | Bio-Formats | Version: | 4.4.9 |
| Keywords: | n.a. | Cc: | crueden-x |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | n.a. |
| Sprint: | n.a. |
Description
I ran into several odd issues when using NetCDF4.0 (as shipped with Bio-Formats). One was not being able to find matching source jars. After that, there was some array handling exceptions. Depending on dependencies to other jars, it'd probably make sense to upgrade.
Change History (10)
comment:1 Changed 8 years ago by crueden-x
comment:2 Changed 8 years ago by jmoore
Thanks for the details, Curtis! From looking at newer versions, it was certainly my impression that it shouldn't be a problem.
comment:3 Changed 8 years ago by crueden-x
There is now a branch called "netcdf-update" on bio-formats.git that upgrades to netcdf-4.2.20 from Maven Central. We can merge whenever desired.
comment:4 Changed 8 years ago by mlinkert
- Sprint set to 2011-11-29 (3)
comment:5 Changed 8 years ago by mlinkert
- Status changed from new to accepted
comment:6 Changed 8 years ago by mlinkert
I just tried merging netcdf-update, and unfortunately this causes compilation to fail. The main problem is that the class file for ucar.unidata.io.RandomAccessFile? is missing from netcdf-4.2.20.jar. It wasn't removed from the API (according to the Javadoc), it is just missing. There is also a secondary problem that the NetCDF JAR name was not updated in ant/toplevel.properties, but that is much more easily fixed.
Since there is now a netcdf-4.2.27.jar, I tried swapping that in for netcdf-4.2.20.jar, and it worked fine (as the class file for ucar.unidata.io.RandomAccessFile? is present). However, running 'mvn -DskipTests?' fails, presumably because the new JAR needs to be added to the Maven repository.
Curtis, could you please let me know what I need to do to make Maven happy (assuming it is OK to use 4.2.27)? Alternatively, we need to figure out why a class is missing from the 4.2.20 JAR.
comment:7 Changed 8 years ago by crueden-x
After some discussion in devteam, the netcdf-update branch has been updated so that the NetCDF 4.2.20 JAR includes the dependent classes. (They had been split out to a separate JAR called unidataCommon-4.2.20.jar.) As of the latest version (4.2.27) that no longer seems to be the case, so as a stopgap we have merely combined these two JARs. We decided not to upgrade to 4.2.27 yet because Maven Central only provides 4.2.20. If in the future Maven Central is not updated, but we need fixes in newer versions of NetCDF, we can push newer versions to our own Maven repository.
comment:8 Changed 8 years ago by mlinkert
- Sprint 2011-11-29 (3) deleted
Unscheduling for now. Even though the work is done, we must all fully agree to require Java 1.6 across the entire stack before the branch can be merged.
comment:9 Changed 7 years ago by mlinkert
- Milestone changed from OMERO-Beta4.4 to Unscheduled
Really, really unscheduling, since we've not agreed that requiring 1.6 is a possibility at the moment.
comment:10 Changed 6 years ago by mlinkert
- Resolution set to fixed
- Status changed from accepted to closed
- Version set to 4.4.9
From the Maven perspective, I want to comment on what is required to upgrade. The NetCDF JAR has a few dependencies, most of them optional. Before creating a POM for it from scratch, I looked around to see if anyone had already done so. The University of Florence had version 4.0.41 available from their Maven repository, so I used that. After a while, it became apparent that the connection to their server (at least from the U.S.) was unstable enough to cause occasional annoyances when updating snapshots and such, so we copied the artifacts to our own repository. Since then, the geotoolkit.org project has deployed newer versions of NetCDF until 4.2.20, at which point NetCDF moved to Maven Central. There is even a source JAR available. So updating to 4.2.20 looks like it will be extremely easy!