NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

[thredds] TDS can't copy config files over content/thredds folder

Hi,

I submitted a question two weeks ago regarding to the deployment of TDS 4.5.0. 
The symptom is: TDS fails to copy configuration files/folders from 
altContent/startup/ to TOMCAT_ROOT/, then TDS can't find xmls in 
content/thredds so I saw these in log file:

moteController.tdsContext; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'tdsContext' defined in...
nested exception is java.lang.NullPointerException

Caused by: java.lang.NullPointerException
        at 
thredds.util.ThreddsConfigReader.getRootList(ThreddsConfigReader.java:62)
        at thredds.servlet.ThreddsConfig.init(ThreddsConfig.java:64)
        at 
thredds.server.config.TdsContext.afterPropertiesSet(TdsContext.java:369)

IMO, this is the consequence of missing config files in content/thredds folder. 
The real problem may reside at:

AbstractServlet.java:68
protected void initContent() throws javax.servlet.ServletException {

    // first time, create content directory
    String initialContentPath = ServletUtil.getInitialContentPath() + getPath();
    File initialContentFile = new File(initialContentPath);
    if (initialContentFile.exists()) {
      try {
        if (ServletUtil.copyDir(initialContentPath, contentPath))
          logServerStartup.info("copyDir " + initialContentPath + " to " + 
contentPath);
      } catch (IOException ioe) {
        logServerStartup.error("failed to copyDir " + initialContentPath + " to 
" + contentPath, ioe);
      }
    }
}

This function failed to copy content from altContent/startup/

I understand the implementation of this function probably is fine. It must be a 
setup issue on my end. But, I just can't find the problem myself. Here is the 
return from ps (I use jsvc over Tomcat 7.0 with APR, TDS version is 4.3 and 4.5)

jsvc.exec -java-home /usr/java/default -user tomcat -pidfile 
/var/lib/tomcat7054/logs/catalina-daemon.pid -wait 10 -outfile 
/var/lib/tomcat7054/logs/catalina-daemon.out -errfile &1 -classpath 
/var/lib/tomcat7054/bin/bootstrap.jar:/var/lib/tomcat7054/bin/commons-daemon.jar:/var/lib/tomcat7054/bin/tomcat-juli.jar
 -Djava.util.logging.config.file=/var/lib/tomcat7054/conf/logging.properties 
-Dtds.content.root.path=/var/lib/tomcat7054/content -Xmx1024m -Xms128m -server 
-Djava.awt.headless=true 
-Djava.util.prefs.systemRoot=/var/lib/tomcat7054/content/thredds/javaUtilPrefs 
-Djava.util.prefs.userRoot=/var/lib/tomcat7054/content/thredds/javaUtilPrefs 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.library.path=/var/lib/tomcat7054/lib/ -Djava.endorsed.dirs= 
-Dcatalina.base=/var/lib/tomcat7054 -Dcatalina.home=/var/lib/tomcat7054 
-Djava.io.tmpdir=/var/lib/tomcat7054/temp org.apache.catalina.startup.Bootstrap

You can tell I have tds.content.root.path, java.util.prefs.systemRoot and 
java.util.prefs.userRoot all point to the right location 
(/var/lib/tomcat7054/content). The tomcat user has full access to this content 
folder. In fact, I can see logs folder created under content/thredds/. But all 
other config files/folders were not there...

Please advise!

Thanks a lot!

Guan



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