org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support. PropertySourcesPlaceholderConfigurer]: Factory method 'properties' threw exception; nested exception is java.lang.RuntimeException: No XNAT home specified in any of the accepted locations: ${xnat.config}/, ${xnat.config. home}/xnat-conf.properties, ${xnat.home}/config/xnat-conf.properties, ${ XNAT_HOME}/config/xnat-conf.properties, ${HOME}/xnat/config/xnat-conf. properties, ${HOME}/config/xnat-conf.properties


Solutions on the web

Solution icon of googlegroups
via Google Groups by Benjamin Sørlie Ormset, 8 months ago
Failed to instantiate [org.springframework.context.support. PropertySourcesPlaceholderConfigurer]: Factory method 'properties' threw exception; nested exception is java.lang.RuntimeException: No XNAT home specified in any of the accepted

Solution icon of googlegroups
via Google Groups by Tim Herrmann, 9 months ago
Failed to instantiate [org.springframework.context.support.PropertySourcesPlaceholderConfigurer]: Factory method 'properties' threw exception; nested exception is java.lang.RuntimeException: No XNAT home specified in any of the accepted

Solution icon of github
Failed to instantiate [org.springframework.boot.autoconfigure.security.SecurityProperties]: Factory method 'securityProperties' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/security/config/http

Solution icon of github
Failed to instantiate [org.neo4j.ogm.session.SessionFactory]: Factory method 'getSessionFactory' threw exception; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: 1

Solution icon of googlegroups
Failed to instantiate [org.kie.internal.runtime.StatefulKnowledgeSession]: Factory method 'JPAKnowledgeServiceFactory' threw exception; nested exception is java.lang. IllegalStateException: java.lang.reflect.InvocationTargetException

Solution icon of stackoverflow
Failed to instantiate [org.springframework.web.servlet.view.InternalResourceViewResolver]: Factory method 'resolver' threw exception; nested exception is java.lang.StackOverflowError

Solution icon of github
Failed to instantiate [org.neo4j.ogm.session.SessionFactory]: Factory method 'getSessionFactory' threw exception; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: 1

Solution icon of stackoverflow
Failed to instantiate [org.springframework.orm.hibernate5.LocalSessionFactoryBean]: Factory method 'sessionFactory' threw exception; nested exception is java.lang.NullPointerException

Solution icon of googlegroups
Failed to instantiate [net.shibboleth.utilities.java.support.xml.BasicParserPool]: Factory method 'parserPool' threw exception; nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.util.SecurityManager from [Module "deployment.cas.war:main" from Service Module Loader]

Solution icon of stackoverflow
Failed to instantiate [org.springframework.cassandra.config.CassandraCqlClusterFactoryBean]: Factory method 'cluster' threw exception; nested exception is java.lang.IllegalArgumentException: Null or empty data center specified for DC-aware policy

Stack trace

org.springframework.beans.BeanInstantiationException: Failed 
to instantiate [org.springframework.context.support.
PropertySourcesPlaceholderConfigurer]: Factory method 'properties' threw 
exception; nested exception is java.lang.RuntimeException: No XNAT home 
specified in any of the accepted locations: ${xnat.config}/, ${xnat.config.
home}/xnat-conf.properties, ${xnat.home}/config/xnat-conf.properties, ${
XNAT_HOME}/config/xnat-conf.properties, ${HOME}/xnat/config/xnat-conf.
properties, ${HOME}/config/xnat-conf.properties
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:154)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:682)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5116)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522)
	at java.util.concurrent.FutureTask.run(FutureTask.java:277)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(Thread.java:785)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.springframework.context.support.
PropertySourcesPlaceholderConfigurer]: Factory method 'properties' threw 
exception; nested exception is java.lang.RuntimeException: No XNAT home 
specified in any of the accepted locations: ${xnat.config}/, ${xnat.config.
home}/xnat-conf.properties, ${xnat.home}/config/xnat-conf.properties, ${
XNAT_HOME}/config/xnat-conf.properties, ${HOME}/xnat/config/xnat-conf.
properties, ${HOME}/config/xnat-conf.properties
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
	... 27 more
Caused by: java.lang.RuntimeException: No XNAT home specified in any of the 
accepted locations: ${xnat.config}/, ${xnat.config.home}/xnat-conf.
properties, ${xnat.home}/config/xnat-conf.properties, ${XNAT_HOME}/config/
xnat-conf.properties, ${HOME}/xnat/config/xnat-conf.properties, ${HOME}/
config/xnat-conf.properties
	at org.nrg.xnat.initialization.PropertiesConfig.getConfigFolderPaths(PropertiesConfig.java:188)
	at org.nrg.xnat.initialization.PropertiesConfig.findConfigurationFile(PropertiesConfig.java:152)
	at org.nrg.xnat.initialization.PropertiesConfig.getXnatConfigurationFile(PropertiesConfig.java:148)
	at org.nrg.xnat.initialization.PropertiesConfig.properties(PropertiesConfig.java:67)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
	... 28 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.