Skip to content

RuntimeConfigParser using wrong method name when reflecting #1473

@rschmunk

Description

@rschmunk

Versions impacted by the bug

5.9.0

What went wrong?

I'm trying to enable use of the netCDF-C library by feeding RuntimeConfigParser an nj22config.xml file and ran into a couple problems.

The first is that at line 292 of that class there is a catch block that throws back a message that NetcdfClibrary is not on the classpath no matter what the exception is in the block just above. It took me a while to puzzle this out because of the use of appending messages to the errlog buffer rather than actually write to a logger, but eventually I figured that out.

Then it turns out that there is always an exception because at line 289, the code tries to get the setLibraryAndPath method from NetcdfClibrary and that method does not exist. So line 292 was not reporting the correct exception.

So I changed 289 to request the setLibraryNameAndPath and NJ now reads my simple config file.

(Unfortunately, I'm now getting an exception a "-128: NetCDF: Attempt to use feature that was not turned on when netCDF was built." trying to read a CDF5 file, but that's a whole nother kettle of trouble.)

Relevant stack trace

Relevant log messages

No response

If you have an example file that you can share, please attach it to this issue.

If so, may we include it in our test datasets to help ensure the bug does not return once fixed?
Note: the test datasets are publicly accessible without restriction.

Yes

Code of Conduct

  • I agree to follow the UCAR/Unidata Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingiosp: netcdf4netcdf4 file format

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions