• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • CE v6.1 RC4 error on deploy with logfikes and env variables

    Hi,
    I am working on deploying the CE v6.1 RC4, on a new fresh installation.
    I am getting first the error that now config for log4j is present:

    log4j:WARN No appenders could be found for logger (com.krishagni.catissueplus.core.init.AppServletContextListener).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info
    

    When cp the default-log4j.properties to log4j.properties the log files is created in /os.log and getting the errors:

    2019-06-27 07:17:42,411 [localhost-startStop-1] ERROR com.krishagni.catissueplus.core.init.AppServletContextListener- Error obtaining webapp context name
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1931)
    at com.krishagni.catissueplus.core.init.AppServletContextListener.getContextName(AppServletContextListener.java:74)
    at com.krishagni.catissueplus.core.init.AppServletContextListener.contextInitialized(AppServletContextListener.java:46)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4900)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5363)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    2019-06-27 07:17:42,416 [localhost-startStop-1] ERROR com.krishagni.catissueplus.core.init.AppServletContextListener- Error initializing app
    java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at com.krishagni.catissueplus.core.init.AppServletContextListener.getContextName(AppServletContextListener.java:77)
    at com.krishagni.catissueplus.core.init.AppServletContextListener.contextInitialized(AppServletContextListener.java:46)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4900)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5363)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1931)
    at com.krishagni.catissueplus.core.init.AppServletContextListener.getContextName(AppServletContextListener.java:74)
    … 14 more
    2019-06-27 07:17:42,440 [localhost-startStop-1] INFO org.springframework.web.context.ContextLoader- Root WebApplicationContext: initialization started
    2019-06-27 07:17:42,571 [localhost-startStop-1] INFO org.springframework.web.context.support.XmlWebApplicationContext- Refreshing Root WebApplicationContext: startup date [Thu Jun 27 07:17:42 UTC 2019]; root of context hierarchy
    2019-06-27 07:17:42,655 [localhost-startStop-1] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
    2019-06-27 07:17:44,059 [localhost-startStop-1] INFO org.springframework.security.core.SpringSecurityCoreVersion- You are running with Spring Security Core 4.2.8.RELEASE
    2019-06-27 07:17:44,066 [localhost-startStop-1] INFO org.springframework.security.config.SecurityNamespaceHandler- Spring Security ‘config’ module version is 4.2.8.RELEASE
    2019-06-27 07:17:44,911 [localhost-startStop-1] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader- Loading XML bean definitions from ServletContext resource [/WEB-INF/migrationContext.xml]
    2019-06-27 07:17:44,940 [localhost-startStop-1] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader- Loading XML bean definitions from ServletContext resource [/WEB-INF/postInitContext.xml]
    2019-06-27 07:17:45,521 [localhost-startStop-1] WARN org.springframework.web.context.support.XmlWebApplicationContext- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name ‘dataSource’ defined in ServletContext resource [/WEB-INF/applicationContext.xml]: null; nested exception is java.lang.NullPointerException
    2019-06-27 07:17:45,524 [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader- Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name ‘dataSource’ defined in ServletContext resource [/WEB-INF/applicationContext.xml]: null; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:223)
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:222)
    at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:283)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:163)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4900)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5363)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.NullPointerException
    at com.krishagni.catissueplus.core.init.AppPropertyPlaceholderConfigurer.resolvePlaceholder(AppPropertyPlaceholderConfigurer.java:9)
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:162)
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PropertyPlaceholderConfigurerResolver.resolvePlaceholder(PropertyPlaceholderConfigurer.java:277)
    at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:147)
    at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:258)
    at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:282)
    at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:204)
    at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141)
    at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82)
    at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:220)
    … 22 more

    Any advice or fix would be greatly appreciated.
    Best
    Robert