This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
There's so much that can go wrong with JNA and it provides so little feedback. A couple comments: * What version of netcdf and hdf5 are you using? We require netcdf 4.3.1 or later and hdf5 1.8.9 or later. Based on the SONAMEs of the shared libraries, it seems like you're okay, but I thought I'd mention it anyway. * It looks like you have libhdf5 binaries in both /lib64 and /usr/lib64. I wonder if that's causing some sort of conflict. You can try debugging JNA by setting the system property "jna.debug_load=true" [1]. This is sometimes useful. The easiest way to set it is in <tomcat_dir>/bin/setenv.sh (you may have to create this file). My setenv.sh is: JVM_ARGS="-ea -server -Xms512m -Xmx2048m" CONTENT_ROOT=-Dtds.content.root.path=/Users/cwardgar/dev/tools/apache-tomcat-8.0.29/content JNA_LIB=-Djna.library.path=/opt/netcdf-4.4.1/lib JNA_DEBUG=-Djna.debug_load=true JAVA_OPTS="$JAVA_OPTS $JVM_ARGS $CONTENT_ROOT $JNA_LIB $JNA_DEBUG" export JAVA_OPTS Then, in $CONTENT_ROOT/thredds/logs/catalina.out, I have: Looking in classpath from WebappClassLoader context: thredds delegate: false ----------> Parent Classloader: java.net.URLClassLoader@19469ea2 for /com/sun/jna/darwin/libjnidispatch.jnilib Found library resource at jar:file:/Users/cwardgar/dev/tools/apache-tomcat-8.0.29/webapps/thredds/WEB-INF/lib/jna-4.0.0.jar!/com/sun/jna/darwin/libjnidispatch.jnilib Looking for library 'netcdf' Adding paths from jna.library.path: /opt/netcdf-4.4.1/lib Trying /opt/netcdf-4.4.1/lib/libnetcdf.dylib Found library 'netcdf' at /opt/netcdf-4.4.1/lib/libnetcdf.dylib Netcdf nc_inq_libvers='4.4.1 of Jul 14 2016 18:17:29 $' isProtected=false [1] https://github.com/java-native-access/jna/blob/master/www/FrequentlyAskedQuestions.md#calling-nativeloadlibrary-causes-an-unsatisfiedlinkerror Ticket Details =================== Ticket ID: UZH-547818 Department: Support THREDDS Priority: Normal Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.