ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

找不着 jdbc 配置文件

2020-10-19 09:01:31  阅读:136  来源: 互联网

标签:jdbc java 配置文件 找不着 springframework catalina context apache org


ignore-unresolvable="true"     







[WARNING] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in URL [jar:file:/D:/maven/repository/com/itheima/ssm_dao/1.0-SNAPSHOT/ssm_dao-1.0-SNAPSHOT.jar!/applicationContext-dao.xml]: Could not resolve placeholder 'jdbc.driver' in value "${jdbc.driver}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.driver' in value "${jdbc.driver}"
[ERROR] Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in URL [jar:file:/D:/maven/repository/com/itheima/ssm_dao/1.0-SNAPSHOT/ssm_dao-1.0-SNAPSHOT.jar!/applicationContext-dao.xml]: Could not resolve placeholder 'jdbc.driver' in value "${jdbc.driver}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.driver' in value "${jdbc.driver}"
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties (PlaceholderConfigurerSupport.java:228)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties (PropertySourcesPlaceholderConfigurer.java:182)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory (PropertySourcesPlaceholderConfigurer.java:157)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors (PostProcessorRegistrationDelegate.java:286)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors (PostProcessorRegistrationDelegate.java:166)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors (AbstractApplicationContext.java:705)
at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:531)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (ContextLoader.java:400)
at org.springframework.web.context.ContextLoader.initWebApplicationContext (ContextLoader.java:291)
at org.springframework.web.context.ContextLoaderListener.10月 19, 2020 8:53:53 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in URL [jar:file:/D:/maven/repository/com/itheima/ssm_dao/1.0-SNAPSHOT/ssm_dao-1.0-SNAPSHOT.jar!/applicationContext-dao.xml]: Could not resolve placeholder 'jdbc.driver' in value "${jdbc.driver}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.driver' in value "${jdbc.driver}"
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:228)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties(PropertySourcesPlaceholderConfigurer.java:182)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:157)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:286)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:166)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.driver' in value "${jdbc.driver}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:178)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124)
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:237)
at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:211)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.lambda$processProperties$0(PropertySourcesPlaceholderConfigurer.java:175)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:296)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:217)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:147)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:85)
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:225)
... 18 more

10月 19, 2020 8:53:53 上午 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
contextInitialized (ContextLoaderListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java:4797)
at org.apache.catalina.core.StandardContext.startInternal (StandardContext.java:5291)
at org.apache.catalina.util.LifecycleBase.start (LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call (ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call (ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:844)
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.driver' in value "${jdbc.driver}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue (PropertyPlaceholderHelper.java:178)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders (PropertyPlaceholderHelper.java:124)
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders (AbstractPropertyResolver.java:237)
at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders (AbstractPropertyResolver.java:211)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.lambda$processProperties$0 (PropertySourcesPlaceholderConfigurer.java:175)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue (BeanDefinitionVisitor.java:296)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue (BeanDefinitionVisitor.java:217)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues (BeanDefinitionVisitor.java:147)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition (BeanDefinitionVisitor.java:85)
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties (PlaceholderConfigurerSupport.java:225)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties (PropertySourcesPlaceholderConfigurer.java:182)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory (PropertySourcesPlaceholderConfigurer.java:157)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors (PostProcessorRegistrationDelegate.java:286)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors (PostProcessorRegistrationDelegate.java:166)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors (AbstractApplicationContext.java:705)
at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:531)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (ContextLoader.java:400)
at org.springframework.web.context.ContextLoader.initWebApplicationContext (ContextLoader.java:291)
at org.springframework.web.context.ContextLoaderListener.contextInitialized (ContextLoaderListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java:4797)
at org.apache.catalina.core.StandardContext.startInternal (StandardContext.java:5291)
at org.apache.catalina.util.LifecycleBase.start (LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call (ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call (ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run (FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:844)
10月 19, 2020 8:53:54 上午 org.apache.catalina.util.SessionIdGenerator createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [224] milliseconds.
10月 19, 2020 8:53:54 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [] startup failed due to previous errors
10月 19, 2020 8:53:54 上午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
10月 19, 2020 8:53:54 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
10月 19, 2020 8:53:54 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.mysql.fabric.jdbc.FabricMySQLDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
10月 19, 2020 8:53:54 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
10月 19, 2020 8:53:54 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.alibaba.druid.mock.MockDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
10月 19, 2020 8:53:54 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoader (file:/D:/maven/repository/org/apache/tomcat/embed/tomcat-embed-core/7.0.37/tomcat-embed-core-7.0.37.jar) to field java.lang.Thread.threadLocals
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoader
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
10月 19, 2020 8:53:54 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-80"]

 

 

 

ignore-resource-not-found:如果属性文件找不到,是否忽略,默认false,即不忽略,找不到文件并不会抛出异常。 
ignore-unresolvable:是否忽略解析不到的属性,如果不忽略,找不到将抛出异常。但它设置为true的主要原因是:

理解:ignore-unresolvable为true时,配置文件${}找不到对应占位符的值 不会报错,会直接赋值'${}';如果设为false,会直接报错。 设置它为true的主要原因,是一个xml中有多个配置文件时的情况:

标签:jdbc,java,配置文件,找不着,springframework,catalina,context,apache,org
来源: https://www.cnblogs.com/KingAndPig/p/13838334.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有