Could not resolve placeholder ' jdbc.username ' in string value "${jdbc.username}"

Source: Internet
Author: User

1. Error description

Severity: Exception sending context initialized event to listener instance of class Org.springframework.web.context.ContextLoad ErListenerorg.springframework.beans.factory.BeanDefinitionStoreException:Invalid Bean definition with name ' DataSource ' defined in file [E:\Eclipse\workspace\AMP\WebContent\WEB-INF\classes\spring\applicationContext.xml]: Could not resolve placeholder ' jdbc.username ' in string value "${jdbc.username}"; Nested exception is java.lang.IllegalArgumentException:Could not resolve placeholder ' jdbc.username ' in string value "${j Dbc.username} "at Org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties ( placeholderconfigurersupport.java:211) at Org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties ( propertyplaceholderconfigurer.java:223) at Org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory ( propertyresourceconfigurer.java:86) at Org.springframework.context.support.PostProceSsorregistrationdelegate.invokebeanfactorypostprocessors (postprocessorregistrationdelegate.java:265) at Org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors ( postprocessorregistrationdelegate.java:162) at Org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors ( abstractapplicationcontext.java:609) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:464) at Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (contextloader.java:403) At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:306) at Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:106) at Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4992) at Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5490) at Org.apache.catalina. util. Lifecyclebase.start (lifecyclebase.java:150) at Org.apache.catalina.core.containerbase$startchild.call ( containerbase.java:1575) at Org.apache.catalina.core.containerbase$startchild.call (ContainerBase.java:1565) 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) caused by:java.lang.IllegalArgumentException:Could not resolve placeholder ' Jdbc.username ' in string value ' ${jdbc.username} ' at Org.springframework.util.PropertyPlaceholderHelper.parseStringValue (propertyplaceholderhelper.java:174) at Org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders (propertyplaceholderhelper.java:126) at org.springframework.beans.factory.config.propertyplaceholderconfigurer$ Placeholderresolvingstringvalueresolver.resolvestringvalue (propertyplaceholderconfigurer.java:259) 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:208) ... More than October 19, 2015 10:05:44 am org.apache.catalina.core.StandardContext startinternal severity: Error listenerstart

2. Cause of error

There is a property jdbc.username in the database configuration file, but it was commented out during the modification


3. Solutions

Jdbc.username, restart server tomcat

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Could not resolve placeholder ' jdbc.username ' in string value "${jdbc.username}"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.