spring 3.1.1 + boneCP0.7.1 tomcat 启动中途不动了

suturn 发布于 2012/12/30 15:34
阅读 2K+
收藏 0
tomcat启动信息如下,获取到boneCP配置后就不动了,最后有配置信息,帮我看看什么原因导致的,谢谢

2012-12-30 15:27:23 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
 INFO [main] - Root WebApplicationContext: initialization started
DEBUG [main] - Initializing new StandardServletEnvironment
DEBUG [main] - Adding [servletConfigInitParams] PropertySource with lowest search precedence
DEBUG [main] - Adding [servletContextInitParams] PropertySource with lowest search precedence
DEBUG [main] - Adding [jndiProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardServletEnvironment with PropertySources [servletConfigInitParams,servletContextInitParams,jndiProperties,systemProperties,systemEnvironment]
 INFO [main] - Refreshing Root WebApplicationContext: startup date [Sun Dec 30 15:27:24 CST 2012]; root of context hierarchy
DEBUG [main] - Replacing [servletContextInitParams] PropertySource with [servletContextInitParams]
DEBUG [main] - Initializing new StandardEnvironment
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [main] - Initializing new StandardEnvironment
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
 INFO [main] - Loading XML bean definitions from class path resource [beans.xml]
DEBUG [main] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG [main] - Loading schema mappings from [META-INF/spring.schemas]
DEBUG [main] - Loaded schema mappings: {http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.1.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-3.1.xsd=org/springframework/beans/factory/xml/spring-beans-3.1.xsd, http://www.springframework.org/schema/cache/spring-cache.xsd=org/springframework/cache/config/spring-cache-3.1.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.1.xsd=org/springframework/scheduling/config/spring-task-3.1.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/batch/spring-batch-2.1.xsd=/org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.1.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd=org/springframework/jdbc/config/spring-jdbc-3.1.xsd, http://www.springframework.org/schema/tool/spring-tool-3.1.xsd=org/springframework/beans/factory/xml/spring-tool-3.1.xsd, http://www.springframework.org/schema/jee/spring-jee-3.1.xsd=org/springframework/ejb/config/spring-jee-3.1.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/batch/spring-batch-2.0.xsd=/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd=org/springframework/jdbc/config/spring-jdbc-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.1.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.1.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.1.xsd=org/springframework/transaction/config/spring-tx-3.1.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context-3.1.xsd=org/springframework/context/config/spring-context-3.1.xsd, http://www.springframework.org/schema/util/spring-util-3.1.xsd=org/springframework/beans/factory/xml/spring-util-3.1.xsd, http://www.springframework.org/schema/lang/spring-lang-3.1.xsd=org/springframework/scripting/config/spring-lang-3.1.xsd, http://www.springframework.org/schema/cache/spring-cache-3.1.xsd=org/springframework/cache/config/spring-cache-3.1.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.1.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.1.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/batch/spring-batch.xsd=/org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc.xsd=org/springframework/jdbc/config/spring-jdbc-3.1.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.1.xsd=org/springframework/aop/config/spring-aop-3.1.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.1.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd}
DEBUG [main] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.1.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.1.xsd
DEBUG [main] - Found XML schema [http://www.springframework.org/schema/tx/spring-tx-3.1.xsd] in classpath: org/springframework/transaction/config/spring-tx-3.1.xsd
DEBUG [main] - Found XML schema [http://www.springframework.org/schema/tool/spring-tool-3.1.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-3.1.xsd
DEBUG [main] - Loading bean definitions
DEBUG [main] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/jdbc=org.springframework.jdbc.config.JdbcNamespaceHandler, http://www.springframework.org/schema/cache=org.springframework.cache.config.CacheNamespaceHandler, http://www.springframework.org/schema/c=org.springframework.beans.factory.xml.SimpleConstructorNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/batch=org.springframework.batch.core.configuration.xml.CoreNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler}
DEBUG [main] - Loaded 12 bean definitions from location pattern [classpath:beans.xml]
DEBUG [main] - Bean factory for Root WebApplicationContext: org.springframework.beans.factory.support.DefaultListableBeanFactory@1f87baf: defining beans [propertyConfigurer,bonecpDataSource,dataSource,sqlSessionFactory,sqlSessionTemplate,txManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,userMapper,userService]; root of factory hierarchy
DEBUG [main] - Creating shared instance of singleton bean 'propertyConfigurer'
DEBUG [main] - Creating instance of bean 'propertyConfigurer'
DEBUG [main] - Eagerly caching bean 'propertyConfigurer' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'propertyConfigurer'
 INFO [main] - Loading properties file from URL [file:/E:/apache-tomcat-6.0.32/webapps/TMS/WEB-INF/classes/jdbc.properties]
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.aop.config.internalAutoProxyCreator'
DEBUG [main] - Creating instance of bean 'org.springframework.aop.config.internalAutoProxyCreator'
DEBUG [main] - Eagerly caching bean 'org.springframework.aop.config.internalAutoProxyCreator' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.aop.config.internalAutoProxyCreator'
DEBUG [main] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@1bb03ee]
DEBUG [main] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1d6bff7]
DEBUG [main] - Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.ResourceBundleThemeSource@8d8f67]
 INFO [main] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1f87baf: defining beans [propertyConfigurer,bonecpDataSource,dataSource,sqlSessionFactory,sqlSessionTemplate,txManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,userMapper,userService]; root of factory hierarchy
DEBUG [main] - Returning cached instance of singleton bean 'propertyConfigurer'
DEBUG [main] - Creating shared instance of singleton bean 'bonecpDataSource'
DEBUG [main] - Creating instance of bean 'bonecpDataSource'
DEBUG [main] - Eagerly caching bean 'bonecpDataSource' to allow for resolving potential circular references
DEBUG [main] - Initializing new StandardEnvironment
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [main] - Initializing new StandardEnvironment
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [main] - Initializing new StandardEnvironment
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [main] - Initializing new StandardEnvironment
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [main] - Initializing new StandardEnvironment
DEBUG [main] - Adding [systemProperties] PropertySource with lowest search precedence
DEBUG [main] - Adding [systemEnvironment] PropertySource with lowest search precedence
DEBUG [main] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
DEBUG [main] - Creating instance of bean 'org.springframework.transaction.config.internalTransactionAdvisor'
DEBUG [main] - Eagerly caching bean 'org.springframework.transaction.config.internalTransactionAdvisor' to allow for resolving potential circular references
DEBUG [main] - Creating shared instance of singleton bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0'
DEBUG [main] - Creating instance of bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0'
DEBUG [main] - Eagerly caching bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0'
DEBUG [main] - Finished creating instance of bean 'org.springframework.transaction.config.internalTransactionAdvisor'
DEBUG [main] - Finished creating instance of bean 'bonecpDataSource'
DEBUG [main] - Creating shared instance of singleton bean 'dataSource'
DEBUG [main] - Creating instance of bean 'dataSource'
DEBUG [main] - Eagerly caching bean 'dataSource' to allow for resolving potential circular references
DEBUG [main] - Returning cached instance of singleton bean 'bonecpDataSource'
DEBUG [main] - Invoking afterPropertiesSet() on bean with name 'dataSource'
DEBUG [main] - JDBC URL = jdbc:sqlserver://127.0.0.1;DatabaseName=SSM, Username = sa, partitions = 3, max (per partition) = 30, min (per partition) = 10, helper threads = 3, idle max age = 1 min, idle test period = 1 min

tomcat启动到这里就不动了

 

帮忙看看什么原因导致tomcat无法启动,谢谢
 

 bean.xml配置文件

<?xml version="1.0" encoding="utf8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd"
	default-autowire="byName" >
	
		<!-- 属性文件读入-->
	<bean id="propertyConfigurer"
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="locations">
			<list>
				<value>classpath*:jdbc.properties</value>
			</list>
		</property>
	</bean>
	<!-- 配置C3P0数据源
	<bean id="bonecpDataSource"
		class="com.mchange.v2.c3p0.ComboPooledDataSource"
		destroy-method="close">
		<property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"></property>
		<property name="jdbcUrl" value="${c3p0.url}"></property>  
		<property name="user" value="${c3p0.user}"></property>
		<property name="password" value="${c3p0.password}"></property>
		<property name="minPoolSize" value="1" />
		<property name="maxPoolSize" value="30" />
		<property name="initialPoolSize" value="2" />
		<property name="acquireIncrement" value="2" />
		<property name="maxIdleTime" value="1800" />
		<property name="maxStatements" value="0" />
		<property name="idleConnectionTestPeriod" value="1800" />
		<property name="acquireRetryAttempts" value="30" />
		<property name="breakAfterAcquireFailure" value="true" />
		<property name="testConnectionOnCheckout" value="false " />
		<property name="autoCommitOnClose" value="true"></property>
	</bean> -->
 

	<!-- 配置boneCP数据源  -->
	<bean id="bonecpDataSource" class="com.jolbox.bonecp.BoneCPDataSource"
		destroy-method="close">
		<property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
		<property name="jdbcUrl"
			value="jdbc:sqlserver://127.0.0.1;DatabaseName=SSM" />
		<property name="username" value="sa" />
		<property name="password" value="suturn" />
		<property name="idleConnectionTestPeriodInMinutes" value="1" />
		<property name="idleMaxAgeInMinutes" value="1" />
		<property name="maxConnectionsPerPartition" value="30" />
		<property name="minConnectionsPerPartition" value="10" />
		<property name="partitionCount" value="3" />
		<property name="acquireIncrement" value="5" />
		<property name="statementsCacheSize" value="0" />
		<property name="releaseHelperThreads" value="3" />
		
	</bean> <!-- 配置boneCP数据源  -->
	<bean id="dataSource"
		class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
		<property name="targetDataSource">
			<ref local="bonecpDataSource" />
		</property>
	</bean>



	<!-- 配置sqlSessionFactory -->
	<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="configLocation" value="classpath:mybatis-config.xml" />
	</bean>

	<!-- 配置sqlSessionTemplate -->
	<bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
		<constructor-arg index="0" ref="sqlSessionFactory" />
	</bean>

	<!-- 配置事务 -->
	<bean id="txManager"
		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
		<property name="dataSource" ref="dataSource" />
	</bean>
	<tx:annotation-driven transaction-manager="txManager" />

	<!-- 配置映射器 -->
	<bean id="userMapper" class="org.mybatis.spring.mapper.MapperFactoryBean">
		<property name="mapperInterface" value="org.monday.app.dao.UserDao" />
		<property name="sqlSessionFactory" ref="sqlSessionFactory" />
	</bean>

	<!-- 配置Service -->
	<bean id="userService" class="org.monday.app.service.impl.UserServiceImpl">
		<property name="userDao" ref="userMapper" />
	</bean>

</beans>
加载中
0
boyTise
boyTise
C3P0数据源和boneCP数据源ID配成一样了吧。
返回顶部
顶部