-Dtds.content.root.path=/opt/tomcat-home/content/For example, your {tomcat}/bin/setenv.sh might look like:
#!/bin/sh # ulimit -n 2048 # CATALINA_HOME="/opt/tomcat-home" export CATALINA_HOME CATALINA_BASE="/opt/tomcat-home" export CATALINA_BASE JAVA_HOME="/opt/jdk" export JAVA_HOME # CONTENT_ROOT="-Dtds.content.root.path=/data/thredds/tds-dev/content" NORMAL="-d64 -Xmx4090m -Xms512m -server" MAX_PERM_GEN="-XX:MaxPermSize=256m" HEADLESS="-Djava.awt.headless=true" JAVA_PREFS_SYSTEM_ROOT="-Djava.util.prefs.systemRoot=$CATALINA_BASE/content/thredds/javaUtilPrefs -Djava.util.prefs.userRoot=$CATALINA_BASE/content/thredds/javaUtilPrefs" # JAVA_OPTS="$CONTENT_ROOT $NORMAL $MAX_PERM_GEN $HEADLESS $JAVA_PREFS_SYSTEM_ROOT" export JAVA_OPTS
Troubleshooting:
Don't leave a space after the =
CONTENT_ROOT="-Dtds.content.root.path=/data/thredds/tds-dev/content" not CONTENT_ROOT= "-Dtds.content.root.path=/data/thredds/tds-dev/content"
If the content root is not correctly set, you will see a message like: "SEVERE: Error listenerStart" in {tomcat}/logs/catalina.out and "Error creating bean with name 'tdsContext'", and "Content directory not a directory" in {$tomcat}/logs/localhost.log.
We recommend that you use an absolute path, like /opt/tomcat/content, instead of a relative path like "../content".
Note that your catalogs are under ${tomcat}/content/thredds but tds.content.root.path does not include the thredds subdirectory.
See JIRA issues log
The catalog processing classes in thredds.catalog2 package have been replaced by thredds.client.catalog everywhere in client code. If you are using thredds.catalog2 in your code, please switch to thredds.client.catalog, as it is takes less memory and is better performant. The old classes are deprecated but still available, but in future versions they will be moved to legacy.jar, which you will need to seperately include in your classpath if needed.
If you are upgrading from 4.3, you may find the 4.3 to 4.5 upgrade document helpful.