Hi Guan,
You've found a bug: the contents of thredds.war/WEB-INF/altContent/startup/
are *supposed* to be copied over to TOMCAT_ROOT/content/tredds/ if that
directory doesn't already exist, but that's never happening. We'll get a
fix for that in the next release (4.5.2).
In the meantime, you can simply copy over those files yourself to get
around the bug.
Thanks for the report!
-Christian Ward-Garrison
On Tue, Jul 22, 2014 at 8:36 PM, Guan Wang <gwang@xxxxxxx> wrote:
> 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
>
> _______________________________________________
> thredds mailing list
> thredds@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/
>
>