Verigreen / verigreen

Verigreen is a lightweight, server side solution for verification of git commits. It is a gated check-in process which will not allow any failed CI commit to go into an integration/release/any protected branch. We keep it green (hence the name).
Apache License 2.0
57 stars 19 forks source link

Spring Exception when Starting Container #121

Closed persiarash closed 7 years ago

persiarash commented 7 years ago

I'm using this script to start a VG container: https://github.com/Verigreen/verigreen/blob/master/utils/service-script/verigreen

After messing around with the configs a bit, I finally got the container to successfully start. Unfortunately, the web server itself does not start due to a Spring exception, as follows:

Nov 18, 2016 4:45:06 AM org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'emailSender' defined in URL [jar:file:/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/verigreen-collector-impl-2.5.6.jar!/Spring/verigreen-collector-common-context.xml]: Could not resolve placeholder 'faq.offline' in string value "${faq.offline}"
        at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)
        at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:220)
        at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:84)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:669)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
        at com.verigreen.common.spring.SpringContextLoader.loadContext(SpringContextLoader.java:56)
        at com.verigreen.collector.spring.CollectorSpringContextLoaderListener.loadParentContext(CollectorSpringContextLoaderListener.java:34)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4994)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1081)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1877)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

Nov 18, 2016 4:45:06 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 18, 2016 4:45:06 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors

Is this due to a mistake on my part in configuring the environment? I did not see anything about a "faq.offline" property anywhere in the guides. If you need me to submit additional information, please let me know.

Thank you.

AndreeaDora commented 7 years ago

Hey @persiarash, "faq.offline" needs to be set in the config.properties file, here is the link to the relevant documentation https://github.com/Verigreen/verigreen/wiki/Verigreen-config.properties-explanations#faq-page-parameters

persiarash commented 7 years ago

Thank you @AndreeaDora that fixed the problem. Unfortunately that property is not listed here, which led to my confusion: https://github.com/Verigreen/verigreen/wiki/Verigreen-Collector-Required-Settings

Thanks again!

soninob commented 7 years ago

Will handle, thanks!