首页 > 代码库 > 【c3p0】报错:java.io.FileNotFoundException: Resource not found at path '/mchange-log.properties'
【c3p0】报错:java.io.FileNotFoundException: Resource not found at path '/mchange-log.properties'
配置项目启动初始,报错如下:
1 java.io.FileNotFoundException: Resource not found at path ‘/mchange-commons.properties‘. 2 at com.mchange.v2.cfg.BasicPropertiesConfigSource.propertiesFromSource(BasicPropertiesConfigSource.java:64) 3 at com.mchange.v2.cfg.BasicMultiPropertiesConfig.firstInit(BasicMultiPropertiesConfig.java:185) 4 at com.mchange.v2.cfg.BasicMultiPropertiesConfig.<init>(BasicMultiPropertiesConfig.java:110) 5 at com.mchange.v2.cfg.ConfigUtils.read(ConfigUtils.java:63) 6 at com.mchange.v2.cfg.MConfig$CSManager.recreateFromKey(MConfig.java:153) 7 at com.mchange.v1.cachedstore.NoCleanupCachedStore.find(NoCleanupCachedStore.java:63) 8 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 9 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 10 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 11 at java.lang.reflect.Method.invoke(Method.java:498) 12 at com.mchange.v1.lang.Synchronizer$1.invoke(Synchronizer.java:58) 13 at com.sun.proxy.$Proxy10.find(Unknown Source) 14 at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:75) 15 at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:81) 16 at com.mchange.v2.resourcepool.BasicResourcePool.<clinit>(BasicResourcePool.java:60) 17 at com.mchange.v2.resourcepool.BasicResourcePoolFactory.createPool(BasicResourcePoolFactory.java:340) 18 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.<init>(C3P0PooledConnectionPool.java:671) 19 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.createPooledConnectionPool(C3P0PooledConnectionPoolManager.java:952) 20 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:397) 21 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:414) 22 at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140) 23 at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139) 24 at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:279) 25 at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:124) 26 at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) 27 at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) 28 at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) 29 at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) 30 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845) 31 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930) 32 at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:372) 33 at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:454) 34 at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:439) 35 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625) 36 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562) 37 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) 38 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) 39 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) 40 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) 41 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) 42 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) 43 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:743) 44 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) 45 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) 46 at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) 47 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) 48 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) 49 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) 50 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189) 51 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 52 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) 53 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) 54 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) 55 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107) 56 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841) 57 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 58 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 59 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 60 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 61 at java.lang.Thread.run(Thread.java:745) 62 17:57:57.776 [localhost-startStop-1] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier ‘/mchange-log.properties‘ could not be found. Skipping. 63 java.io.FileNotFoundException: Resource not found at path ‘/mchange-log.properties‘. 64 at com.mchange.v2.cfg.BasicPropertiesConfigSource.propertiesFromSource(BasicPropertiesConfigSource.java:64) 65 at com.mchange.v2.cfg.BasicMultiPropertiesConfig.firstInit(BasicMultiPropertiesConfig.java:185) 66 at com.mchange.v2.cfg.BasicMultiPropertiesConfig.<init>(BasicMultiPropertiesConfig.java:110) 67 at com.mchange.v2.cfg.ConfigUtils.read(ConfigUtils.java:63) 68 at com.mchange.v2.cfg.MConfig$CSManager.recreateFromKey(MConfig.java:153) 69 at com.mchange.v1.cachedstore.NoCleanupCachedStore.find(NoCleanupCachedStore.java:63) 70 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 71 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 72 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 73 at java.lang.reflect.Method.invoke(Method.java:498) 74 at com.mchange.v1.lang.Synchronizer$1.invoke(Synchronizer.java:58) 75 at com.sun.proxy.$Proxy10.find(Unknown Source) 76 at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:75) 77 at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:81) 78 at com.mchange.v2.resourcepool.BasicResourcePool.<clinit>(BasicResourcePool.java:60) 79 at com.mchange.v2.resourcepool.BasicResourcePoolFactory.createPool(BasicResourcePoolFactory.java:340) 80 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.<init>(C3P0PooledConnectionPool.java:671) 81 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.createPooledConnectionPool(C3P0PooledConnectionPoolManager.java:952) 82 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:397) 83 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:414) 84 at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140) 85 at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139) 86 at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:279) 87 at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:124) 88 at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) 89 at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) 90 at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) 91 at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) 92 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845) 93 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930) 94 at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:372) 95 at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:454) 96 at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:439) 97 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625) 98 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562) 99 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) 100 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) 101 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) 102 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) 103 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) 104 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) 105 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:743) 106 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) 107 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) 108 at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) 109 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) 110 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) 111 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) 112 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189) 113 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 114 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) 115 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) 116 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) 117 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107) 118 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841) 119 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 120 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 121 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 122 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 123 at java.lang.Thread.run(Thread.java:745) 124 17:57:57.776 [localhost-startStop-1] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier ‘/c3p0.properties‘ could not be found. Skipping. 125 java.io.FileNotFoundException: Resource not found at path ‘/c3p0.properties‘. 126 at com.mchange.v2.cfg.BasicPropertiesConfigSource.propertiesFromSource(BasicPropertiesConfigSource.java:64) 127 at com.mchange.v2.cfg.BasicMultiPropertiesConfig.firstInit(BasicMultiPropertiesConfig.java:185) 128 at com.mchange.v2.cfg.BasicMultiPropertiesConfig.<init>(BasicMultiPropertiesConfig.java:110) 129 at com.mchange.v2.cfg.ConfigUtils.read(ConfigUtils.java:63) 130 at com.mchange.v2.cfg.MConfig$CSManager.recreateFromKey(MConfig.java:153) 131 at com.mchange.v1.cachedstore.NoCleanupCachedStore.find(NoCleanupCachedStore.java:63) 132 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 133 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 134 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 135 at java.lang.reflect.Method.invoke(Method.java:498) 136 at com.mchange.v1.lang.Synchronizer$1.invoke(Synchronizer.java:58) 137 at com.sun.proxy.$Proxy10.find(Unknown Source) 138 at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:75) 139 at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:81) 140 at com.mchange.v2.resourcepool.BasicResourcePool.<clinit>(BasicResourcePool.java:60) 141 at com.mchange.v2.resourcepool.BasicResourcePoolFactory.createPool(BasicResourcePoolFactory.java:340) 142 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.<init>(C3P0PooledConnectionPool.java:671) 143 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.createPooledConnectionPool(C3P0PooledConnectionPoolManager.java:952) 144 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:397) 145 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:414) 146 at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140) 147 at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139) 148 at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:279) 149 at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:124) 150 at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) 151 at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) 152 at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) 153 at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) 154 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845) 155 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930) 156 at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:372) 157 at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:454) 158 at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:439) 159 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625) 160 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562) 161 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) 162 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) 163 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) 164 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) 165 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) 166 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) 167 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:743) 168 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) 169 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) 170 at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) 171 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) 172 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) 173 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) 174 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189) 175 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 176 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) 177 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) 178 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) 179 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107) 180 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841) 181 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 182 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 183 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 184 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 185 at java.lang.Thread.run(Thread.java:745) 186 17:57:57.776 [localhost-startStop-1] DEBUG com.mchange.v2.cfg.MConfig - The configuration file for resource identifier ‘hocon:/reference,/application,/c3p0,/‘ could not be found. Skipping. 187 java.io.FileNotFoundException: HOCON lib (typesafe-config) is not available. Also, no resource available at ‘/reference,/application,/c3p0,/‘ for HOCON identifier ‘hocon:/reference,/application,/c3p0,/‘. 188 at com.mchange.v2.cfg.BasicMultiPropertiesConfig.configSource(BasicMultiPropertiesConfig.java:86) 189 at com.mchange.v2.cfg.BasicMultiPropertiesConfig.firstInit(BasicMultiPropertiesConfig.java:184) 190 at com.mchange.v2.cfg.BasicMultiPropertiesConfig.<init>(BasicMultiPropertiesConfig.java:110) 191 at com.mchange.v2.cfg.ConfigUtils.read(ConfigUtils.java:63) 192 at com.mchange.v2.cfg.MConfig$CSManager.recreateFromKey(MConfig.java:153) 193 at com.mchange.v1.cachedstore.NoCleanupCachedStore.find(NoCleanupCachedStore.java:63) 194 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 195 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 196 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 197 at java.lang.reflect.Method.invoke(Method.java:498) 198 at com.mchange.v1.lang.Synchronizer$1.invoke(Synchronizer.java:58) 199 at com.sun.proxy.$Proxy10.find(Unknown Source) 200 at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:75) 201 at com.mchange.v2.cfg.MConfig.readVmConfig(MConfig.java:81) 202 at com.mchange.v2.resourcepool.BasicResourcePool.<clinit>(BasicResourcePool.java:60) 203 at com.mchange.v2.resourcepool.BasicResourcePoolFactory.createPool(BasicResourcePoolFactory.java:340) 204 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.<init>(C3P0PooledConnectionPool.java:671) 205 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.createPooledConnectionPool(C3P0PooledConnectionPoolManager.java:952) 206 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:397) 207 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:414) 208 at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140) 209 at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139) 210 at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:279) 211 at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:124) 212 at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) 213 at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) 214 at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) 215 at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887) 216 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845) 217 at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930) 218 at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:372) 219 at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:454) 220 at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:439) 221 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625) 222 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562) 223 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) 224 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) 225 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) 226 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) 227 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) 228 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) 229 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:743) 230 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) 231 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) 232 at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) 233 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) 234 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) 235 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) 236 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189) 237 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 238 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) 239 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) 240 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) 241 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107) 242 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841) 243 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 244 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 245 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 246 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 247 at java.lang.Thread.run(Thread.java:745)
并且一直在弹出下面的DEBUG
17:58:27.778 [C3P0PooledConnectionPoolManager[identityToken->1hge3v29ny82yzjqh08vg|13532bd3]-AdminTaskTimer] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - Checking for expired resources - Mon Apr 17 17:58:27 CST 2017 [com.mchange.v2.resourcepool.BasicResourcePool@422e0e85]
17:58:27.778 [C3P0PooledConnectionPoolManager[identityToken->1hge3v29ny82yzjqh08vg|13532bd3]-AdminTaskTimer] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - BEGIN check for expired resources. [com.mchange.v2.resourcepool.BasicResourcePool@422e0e85]
17:58:27.778 [C3P0PooledConnectionPoolManager[identityToken->1hge3v29ny82yzjqh08vg|13532bd3]-AdminTaskTimer] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - FINISHED check for expired resources. [com.mchange.v2.resourcepool.BasicResourcePool@422e0e85]
17:58:27.778 [C3P0PooledConnectionPoolManager[identityToken->1hge3v29ny82yzjqh08vg|13532bd3]-AdminTaskTimer] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - Refurbishing idle resources - Mon Apr 17 17:58:27 CST 2017 [com.mchange.v2.resourcepool.BasicResourcePool@422e0e85]
17:58:27.780 [C3P0PooledConnectionPoolManager[identityToken->1hge3v29ny82yzjqh08vg|13532bd3]-HelperThread-#0] DEBUG com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool - Testing PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@6f1aa987] on IDLE CHECK.
17:58:27.780 [C3P0PooledConnectionPoolManager[identityToken->1hge3v29ny82yzjqh08vg|13532bd3]-HelperThread-#1] DEBUG com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool - Testing PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@1b0b419] on IDLE CHECK.
17:58:27.780 [C3P0PooledConnectionPoolManager[identityToken->1hge3v29ny82yzjqh08vg|13532bd3]-HelperThread-#2] DEBUG com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool - Testing PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@3a775b00] on IDLE CHECK.
17:58:27.781 [C3P0PooledConnectionPoolManager[identityToken->1hge3v29ny82yzjqh08vg|13532bd3]-HelperThread-#2] DEBUG com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool - Test of PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@3a775b00] on IDLE CHECK has SUCCEEDED.
17:58:27.781 [C3P0PooledConnectionPoolManager[identityToken->1hge3v29ny82yzjqh08vg|13532bd3]-HelperThread-#0] DEBUG com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool - Test of PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@6f1aa987] on IDLE CHECK has SUCCEEDED.
解决方法:
【原因】:发现打出这些错误的那个项目配置了slf4j日志, 猜测是c3p0使用了slf4j进行日志记录, 当检测到有该jar包时, 使用DEBUG级别打印出调试消息.
这个并不影响项目使用,但是强迫症必用
pom.xml文件中这个删掉:
<dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.7</version> <scope>runtime</scope> </dependency>
【c3p0】报错:java.io.FileNotFoundException: Resource not found at path '/mchange-log.properties'
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。