Re: netcdf-java 2.2.10 problem

i assume you are using ncCore.jar?

It appears I introduced a dependency on NetcdfFileCache that i forgot to 
include in the jar.

This isnt a problem if you use the full netcdf.jar. If you need the smaller 
jar, i will fix the problem.


Bob Simons wrote:
I am trying to switch from Netcdf-java 2.1 to Netcdf-java 2.2.10.
I have gotten everything switched over (grumble, grumble, a little documentation about how to handle things that have changed would be nice... although maybe I just didn't find it, :-) ), except for NCdump.print and its variants. Whenever I call it, I get the error message:

Exception in thread "main" java.lang.NoClassDefFoundError
        at ucar.nc2.NCdump.print(NCdump.java:191)
        at ucar.nc2.NCdump.printHeader(NCdump.java:54)
        at <my code>

Line 191 in the source code you distribute is
          NetcdfFileCache.release(nc);

Usually, these problems are solvable. But this time, I am at a loss as to how to solve the problem. It isn't an "import" problem in my code or a -cp problem on my compiler command line, because my code compiles correctly. It isn't a -cp problem on the java command line, because my running code clearly finds NCdump. It isn't that NetcdfFileCache.class isn't in the .jar you distribute (I checked; it's there).

I looked at the list of changes for 2.2.11, but didn't see anything that looked relevant.

I didn't find any unit test methods in the source code which would demonstrate this class working correctly. (Maybe they are there and I didn't find them.)

Any suggestions?

Sincerely,

Bob Simons
Satellite Data Product Manager
Environmental Research Division
NOAA Southwest Fisheries Science Center
1352 Lighthouse Ave
Pacific Grove, CA 93950-2079
(831)658-3205
bob.simons@xxxxxxxx
<>< <>< <>< <>< <>< <>< <>< <>< <><


  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: