JasperServer Returns a 404 when trying to access - Could not resolve placeholder 'report.scheduler.mail.sender.username'
search cancel

JasperServer Returns a 404 when trying to access - Could not resolve placeholder 'report.scheduler.mail.sender.username'

book

Article ID: 213015

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

  
When trying to access the jasperserver (http://<jasperserver.xyz>:<port>/jasperserver-pro/ a 404 error is returned.





When looking at the apache-tomcat log file the following error is seen

/opt/CA/SharedComponents/CA Business Intelligence/apache-tomcat/logs/catalina.out

2021-04-16 16:53:27,902 ERROR ContextLoader,localhost-startStop-1:331 - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'mailSenderService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'report.scheduler.mail.sender.username' in string value "${report.scheduler.mail.sender.username}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'report.scheduler.mail.sender.username' in string value "${report.scheduler.mail.sender.username}"
 at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)
 at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:222)
 at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:84)
 at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:703)
 at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
 at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4776)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5240)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1874)
 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.IllegalArgumentException: Could not resolve placeholder 'report.scheduler.mail.sender.username' in string value "${report.scheduler.mail.sender.username}"
 at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:173)
 at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:125)
 at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:257)
 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:206)
 ... 21 more
16-Apr-2021 16:53:27.940 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
16-Apr-2021 16:53:27.941 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/jasperserver-pro] startup failed due to previous errors

Environment

Release : 10.4.1

Component : Spectrum Core / SpectroSERVER

Cause

   

The mailSenderService bean defined within applicationContext.xml contains variable place holders and these variables being referenced
   must be present. In this case 'report.scheduler.mail.sender.username' is defined within the js.quartz.properties file and was
   commented out.

Resolution


Restored the report.scheduler.mail.sender.username variable defined within the js.quartz.properties file and restarted CABI.

example


Note: To stop and start CABI

cd /opt/CA/SharedComponents/CA Business Intelligence/
./stopServers.sh
./startServers.sh