Could not resolve placeholder 'jdbc.username' in string value "${jdbc.username}"
来源:互联网 发布:超市软件安装视频 编辑:程序博客网 时间:2024/06/06 09:08
1、错误描述
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.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 "${jdbc.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)... 18 more十月 19, 2015 10:05:44 上午 org.apache.catalina.core.StandardContext startInternal严重: Error listenerStart
2、错误原因
数据库配置文件中有个属性jdbc.username,但是修改的过程中将其注释掉了
3、解决办法
将jdbc.username解注,重启服务器Tomcat
1 0
- Could not resolve placeholder 'jdbc.username' in string value "${jdbc.username}"
- Could not resolve placeholder 'jdbc.driverClassName' in string value "${jdbc.driverClassName}
- Could not resolve placeholder 'master.jdbc.url' in string value "${master.jdbc.url}"
- Could not resolve placeholder 'jdbc.url' in string value "${jdbc.url}"
- 报错Could not resolve placeholder 'jdbc.driverClassName' in string value "${jdbc.driverClassName}
- Could not resolve placeholder 'jdbc.driverClassName' in string value "${jdbc.driverClassName}错误
- 错误笔记之Could not resolve placeholder 'jdbc.driver' in string value "${jdbc.driver}"
- Could not resolve placeholder 'jdbc.url' in string value "${jdbc.url}"
- $Value{}ntException: Could not resolve placeholder 'KEY' in string value "${
- Could not resolve placeholder 'driverClassName' in string value "${driverClassName}"
- Could not resolve placeholder 'CUST_INDUSTORY' in string value "${CUST_INDUSTORY}"
- Could not resolve placeholder 'driver' in string value "${driver}"
- 解决 IllegalArgumentException: Could not resolve placeholder in string value "${XXXXXX}"
- Could not resolve placeholder 'driverClasss' in string value "${driverClasss}"
- 解决 IllegalArgumentException: Could not resolve placeholder in string value "${XXXXXX}"
- sharding jdbc--Cloud not resolve placeholder … in string value …?
- Could not resolve placeholder 'jdbc.driverClass'
- Could not resolve placeholder jdbc.url
- Java 泛型 整理
- win8 安装mysql 5.6 64位解压缩版本
- linux常用命令的英文单词缩写
- Python常用内建函数(string&&list)
- Topcoder SRM671
- Could not resolve placeholder 'jdbc.username' in string value "${jdbc.username}"
- 工作备忘-制作Framework所用shell脚本代码
- 前端开发中的性能那点事(三)php的opcode缓存
- 中断服务函数能不能带形参和返回值?
- 总结Oracle,sqlserver,mysql中查询10-20条记录的写法
- linux DNS服务器配置
- 自定义控件 @IBDesignable @IBInspectable
- 线程重用——线程池的基本原理
- 一些小功能的累积