Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Severe error at startup if TDS's ContextPath is changed #101

Open
cofinoa opened this issue Mar 3, 2015 · 3 comments
Open

Severe error at startup if TDS's ContextPath is changed #101

cofinoa opened this issue Mar 3, 2015 · 3 comments

Comments

@cofinoa
Copy link
Contributor

cofinoa commented Mar 3, 2015

If the context path is been changed the TDS is complaining about a non-existent directory.

What I have made is to generate a directory with the same context path name in the content path.

Excerpt from my log file apache-tomcat-7.0.34/logs/localhost.2015-03-03.log

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ConfigCatalogManager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private thredds.server.config.TdsContext thredds.core.ConfigCatalogManager.tdsContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tdsContext' defined in file [/vols/oceano/services/TDS6/apache-tomcat-7.0.34/webapps/tds6/WEB-INF/classes/thredds/server/config/TdsContext.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Content directory not a directory
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:298)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1148)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
...skipping...
it method failed; nested exception is java.lang.IllegalStateException: Content directory not a directory
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:921)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:864)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:779)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:498)
        ... 29 more
Caused by: java.lang.IllegalStateException: Content directory not a directory
        at thredds.server.config.TdsContext.afterPropertiesSet(TdsContext.java:335)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
        ... 39 more

@JohnLCaron
Copy link
Collaborator

Hi Antonio:

Are you setting

-Dtds.content.root.path=

see

http:https://www.unidata.ucar.edu/software/thredds/v4.5/tds/UpgradingTo4.5.html

John

@cofinoa
Copy link
Contributor Author

cofinoa commented Mar 5, 2015

Hi John,
Yes I set and exported
CONTENT_ROOT="-Dtds.content.root.path=$SERVICE_HOME/tomcat/content"
the TDS startup with no problems.
if I change the default value for the TDS property
tds.content.path=thredds
to (for example)
tds.content.path=thredds2
the TDS doesn't startup. You have to create the thredds2 directory on the CONTENT_ROOT

Antonio

@cwardgar cwardgar reopened this Mar 6, 2015
@cofinoa
Copy link
Contributor Author

cofinoa commented Mar 9, 2015

I have also noticed that general logs files (i.e. featureCollectionScan.log, threddsServlet.log, ...) are generated in $CONTENT_ROOT/thredds instead on specified content path (i.e. $CONTENT_ROOT/thredds)

Antonio
P.S.: tested on branch 4.6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants