java.lang.Exception: DEBUG STACK TRACE for PoolBackedDataSource.close().

本文探讨了Spring框架中数据源配置的destroy-method属性使用不当导致的问题,并给出了合理的解决方案。
15:20:30,662 DEBUG AbstractPoolBackedDataSource:417 - com.mchange.v2.c3p0.ComboPooledDataSource@1fe621ba has been closed. 
java.lang.Exception: DEBUG STACK TRACE for PoolBackedDataSource.close().
	at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.close(AbstractPoolBackedDataSource.java:417)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:327)
	at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:742)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455)
	at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1090)
	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1064)
	at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:980)
15:20:30,663 DEBUG DisposableBeanAdapter:226 - Invoking destroy() on bean with name 'springHelper'
15:20:30,662 DEBUG ThreadPoolAsynchronousRunner:578 - Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main] interrupted. Shutting down.
15:20:30,662 DEBUG ThreadPoolAsynchronousRunner:578 - Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main] interrupted. Shutting down.
15:20:30,662 DEBUG ThreadPoolAsynchronousRunner:578 - Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main] interrupted. Shutting down.
15:20:30,663 DEBUG NewPooledConnection:566 - com.mchange.v2.c3p0.impl.NewPooledConnection@2d3c9854 closed by a client.
java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:566)
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
	at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
	at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:989)
	at com.mchange.v2.resourcepool.BasicResourcePool.access$100(BasicResourcePool.java:32)
	at com.mchange.v2.resourcepool.BasicResourcePool$5.run(BasicResourcePool.java:1174)
15:20:30,664 DEBUG C3P0PooledConnectionPool:476 - Successfully destroyed PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@2d3c9854
15:20:30,664 DEBUG BasicResourcePool:967 - Successfully destroyed resource: com.mchange.v2.c3p0.impl.NewPooledConnection@2d3c9854
15:20:30,664 DEBUG BasicResourcePool:962 - Preparing to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@6cb9b841
15:20:30,664 DEBUG C3P0PooledConnectionPool:468 - Preparing to destroy PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@6cb9b841
15:20:30,664 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'areaMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,664 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'directGradeMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,664 DEBUG NewPooledConnection:566 - com.mchange.v2.c3p0.impl.NewPooledConnection@6cb9b841 closed by a client.
java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:566)
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
	at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
	at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:989)
	at com.mchange.v2.resourcepool.BasicResourcePool.access$100(BasicResourcePool.java:32)
	at com.mchange.v2.resourcepool.BasicResourcePool$5.run(BasicResourcePool.java:1174)
15:20:30,665 DEBUG C3P0PooledConnectionPool:476 - Successfully destroyed PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@6cb9b841
15:20:30,665 DEBUG BasicResourcePool:967 - Successfully destroyed resource: com.mchange.v2.c3p0.impl.NewPooledConnection@6cb9b841
15:20:30,665 DEBUG BasicResourcePool:962 - Preparing to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@13385eca
15:20:30,665 DEBUG C3P0PooledConnectionPool:468 - Preparing to destroy PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@13385eca
15:20:30,664 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'directResourceMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,665 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'directRuleMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,665 DEBUG NewPooledConnection:566 - com.mchange.v2.c3p0.impl.NewPooledConnection@13385eca closed by a client.
java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:566)
	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
	at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
	at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:989)
	at com.mchange.v2.resourcepool.BasicResourcePool.access$100(BasicResourcePool.java:32)
	at com.mchange.v2.resourcepool.BasicResourcePool$5.run(BasicResourcePool.java:1174)
15:20:30,666 DEBUG C3P0PooledConnectionPool:476 - Successfully destroyed PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@13385eca
15:20:30,666 DEBUG BasicResourcePool:967 - Successfully destroyed resource: com.mchange.v2.c3p0.impl.NewPooledConnection@13385eca
15:20:30,665 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'areaService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,666 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'directGradeService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,666 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'directResourceService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,666 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'directRuleService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,667 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'shieldMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,667 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'topMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,667 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'searchService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,667 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'shieldService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,667 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'topService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,667 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'keywordMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,668 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'relateWordMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,668 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'IKeywordService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,668 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'statusHandler': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,668 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'approveStatus': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,668 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'approveDao': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,668 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'approverDao': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,669 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'workOrderDao': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,669 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'approverService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,669 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'approveService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,669 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'processService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,669 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'workOrderService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,669 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'baseMapperDao': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,670 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'methodLog': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,670 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'baseAffairsService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,670 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'baseService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,670 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'constantUtil': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,670 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'constant': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,670 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'authMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,671 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'orgMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,671 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'roleAuthMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,671 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'roleMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,671 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'sysLogMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,671 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'userMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,671 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'userRoleMapper': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,672 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'roleService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,672 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'sysLogService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,672 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'userService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,672 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'menuService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,673 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'statisticsService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,673 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'IRelatedSolrService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,673 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'ISolrService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,673 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'ITextService': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
15:20:30,673 DEBUG DefaultListableBeanFactory:1380 - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'IRelatedWordUpdate': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)


具体到这个问题里,就是来自Spring关于数据源的那个配置文件

1<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
2//略去数据源相关信息的配置
3</bean>

Spring在读取这个配置文件以后,需要根据这些信息来实例化一些类,然后内部再根据中间的那些配置信息来实际构造数据源。

      可是来了个问题。不能保证这里的ComboPooledDataSource数据源一定是可用的,也不能保证close方法一定能关闭连接,对吧?Spring本身不能检查这个类是否真实有效,毫无Bug。实际上呢,也检查不了。同样的,close方法是否有效,也需要进行检查。

 虽然API规定了close是关闭连接释放资源的。但这只是你接口的一厢情愿。也许人家实现厂家觉得close方法不够帅,要改成closeConnection。那。。。Spring总不好傻傻的去死扣close方法来关闭连接吧?虽然这方法必须实现,但是可没说一定要有内容啊。如果是空方法呢?所以有了destroy-method这个配置项的出现。

 

  总结:

     当不能确定destory-method的情况下,把该项删除,由程序自主选择关闭方法,这样Debug就不会报错了

具体请看这里http://csumissu.iteye.com/blog/1079576


答案出处:

http://www.oschina.net/question/137649_71699


09-18 11:47:12.265009 1969 3560 I DropBoxManagerService: add tag=system_app_crash isTagEnabled=true flags=0x2 09-18 11:47:12.265124 1236 1251 I URCC_CORE_SERVER: [urccRequestReleaseExec] urccRelease: handle: 2751, said:1 09-18 11:47:12.265429 1236 4537 I URCC_RES_MANAGER: [getResRequestNode] Can not get the node for handle:2751, resid: 0x01011090 09-18 11:47:12.265649 1236 1251 I URCC_RES_MANAGER: [dumpResourceApplyInfo] urccResUpdate: XKF&^hcdg#jm9j#ibjjjjj#jmjj$#^hcdg#jm7j#hbjjjjj#jmjj$#^hcdg#jm8j#hbjjjjj#jmjj$#^hcdg#jm8hj#g#jmjj$#^hcdg#jmd5j#j#jmjj$#^hcdg#jmddj#j#jmjj$#^hcdg#jm89j#g#jmjj$#^hcdg#jmig5j#ij#jmjj$#^hcdg#jmdej#j#jmjj$#^hcdg#jmifjj#hj#jmjj$#^hcdg#jm88j#i#jmjj$#^hcdg#jm8gj#i#jmjj$#^hcdg#jm8ij#f#jmjj$#^hcdg#jm8aj#f#jmjj$#^hcdg#jmd6j#j#jmjj$ 09-18 11:47:12.266170 1969 3560 D DropBoxManagerService: file :: /data/system/dropbox/system_app_crash@1758167232265.txt 09-18 11:47:12.266205 1969 3560 W DropBoxManagerService: assert append, the tag is :: system_app_crash 09-18 11:47:12.266340 1969 3560 D DEBUGLOG.ASSERT: after replace ':' with '_' ,the ProcessName is com.google.android.gms.ui 09-18 11:47:12.266461 1969 3560 D DEBUGLOG.ASSERT: copyAssert destFile=/com.google.android.gms.ui-4954-2025-09-18-11-47-12.txt 09-18 11:47:12.266622 1969 3560 W System.err: java.io.FileNotFoundException: /com.google.android.gms.ui-4954-2025-09-18-11-47-12.txt: open failed: EROFS (Read-only file system) 09-18 11:47:12.266709 1969 3560 W System.err: at libcore.io.IoBridge.open(IoBridge.java:574) 09-18 11:47:12.266717 1969 3560 W System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:259) 09-18 11:47:12.266721 1969 3560 W System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:208) 09-18 11:47:12.266731 1969 3560 W System.err: at com.oplus.debug.ASSERT.copyAssert(ASSERT.java:204) 09-18 11:47:12.266734 1969 3560 W System.err: at com.oplus.debug.ASSERT.epitaph(ASSERT.java:153) 09-18 11:47:12.266738 1969 3560 W System.err: at com.android.server.DropBoxManagerServiceExtImpl.addDropBoxFile(DropBoxManagerServiceExtImpl.java:345) 09-18 11:47:12.266741 1969 3560 W System.err: at com.android.server.DropBoxManagerService.addEntry(DropBoxManagerService.java:646) 09-18 11:47:12.266745 1969 3560 W System.err: at com.android.server.DropBoxManagerService.addEntry(DropBoxManagerService.java:559) 09-18 11:47:12.266750 1969 3560 W System.err: at com.android.server.DropBoxManagerService.addData(DropBoxManagerService.java:526) 09-18 11:47:12.266754 1969 3560 W System.err: at com.android.server.DropBoxManagerService$2.addData(DropBoxManagerService.java:255) 09-18 11:47:12.266758 1969 3560 W System.err: at com.android.internal.os.IDropBoxManagerService$Stub.onTransact(IDropBoxManagerService.java:132) 09-18 11:47:12.266761 1969 3560 W System.err: at android.os.Binder.execTransactInternal(Binder.java:1439) 09-18 11:47:12.266764 1969 3560 W System.err: at android.os.Binder.execTransact(Binder.java:1378) 09-18 11:47:12.266789 1969 3560 W System.err: Caused by: android.system.ErrnoException: open failed: EROFS (Read-only file system) 09-18 11:47:12.266794 1969 3560 W System.err: at libcore.io.Linux.open(Native Method) 09-18 11:47:12.266797 1969 3560 W System.err: at libcore.io.ForwardingOs.open(ForwardingOs.java:568) 09-18 11:47:12.266800 1969 3560 W System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:274) 09-18 11:47:12.266802 1969 3560 W System.err: at libcore.io.IoBridge.open(IoBridge.java:560) 09-18 11:47:12.266805 1969 3560 W System.err: ... 12 more 09-18 11:47:12.266827 1969 3560 W DEBUGLOG.ASSERT: assert state is close 09-18 11:47:12.267274 4954 4954 I Process : Quit itself, Pid:4954 StackTrace:aytj.d:5 axpg.a:9 axvd.uncaughtException:3 axvd.uncaughtException:13 axvd.uncaughtException:13 java.lang.ThreadGroup.uncaughtException:1071 java.lang.ThreadGroup.uncaughtException:1066 com.android.internal.os.RuntimeInitExtImpl.uncaughtExceptionExt:72 com.android.internal.os.RuntimeInit$LoggingHandler.uncaughtException:138 java.lang.Thread.dispatchUncaughtException:2436 09-18 11:47:12.267330 4954 4954 I Process : Sending signal. PID: 4954 SIG: 9
最新发布
09-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值