2012-2-2 0:15:10 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_06\bin;D:\apache-tomcat-6.0.26\bin 2012-2-2 0:15:10 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8081 2012-2-2 0:15:10 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 443 ms 2012-2-2 0:15:10 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2012-2-2 0:15:10 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.26 2012-2-2 0:15:10 org.apache.catalina.startup.HostConfig deployDescriptor 信息: Deploying configuration descriptor host-manager.xml 2012-2-2 0:15:11 org.apache.catalina.startup.HostConfig deployDescriptor 信息: Deploying configuration descriptor manager.xml 2012-2-2 0:15:11 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory cache 2012-2-2 0:15:11 org.apache.catalina.loader.WebappClassLoader validateJarFile 信息: validateJarFile(D:\apache-tomcat-6.0.26\webapps\cache\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 2012-2-2 0:15:12 org.apache.catalina.core.ApplicationContext log 信息: Set web app root system property: 'cache.root' = [D:\apache-tomcat-6.0.26\webapps\cache\] 2012-2-2 0:15:12 org.apache.catalina.core.ApplicationContext log 信息: Initializing Log4J from [D:\apache-tomcat-6.0.26\webapps\cache\WEB-INF\classes\config\log4j.xml] 2012-02-02 00:15:12 INFO ContextLoader:180 - Root WebApplicationContext: initialization started 2012-2-2 0:15:12 org.apache.catalina.core.ApplicationContext log 信息: Loading Spring root WebApplicationContext 2012-02-02 00:15:12 INFO CollectionFactory:66 - JDK 1.4+ collections available 2012-02-02 00:15:12 INFO CollectionFactory:71 - Commons Collections 3.x available 2012-02-02 00:15:12 INFO XmlBeanDefinitionReader:163 - Loading XML bean definitions from file [D:\apache-tomcat-6.0.26\webapps\cache\WEB-INF\classes\config\spring\applicationContext-acegi-security.xml] 2012-02-02 00:15:12 INFO XmlBeanDefinitionReader:163 - Loading XML bean definitions from file [D:\apache-tomcat-6.0.26\webapps\cache\WEB-INF\classes\config\spring\applicationContext.xml] 2012-02-02 00:15:12 INFO XmlBeanDefinitionReader:163 - Loading XML bean definitions from file [D:\apache-tomcat-6.0.26\webapps\cache\WEB-INF\classes\config\spring\monitor-dao.xml] 2012-02-02 00:15:12 INFO XmlBeanDefinitionReader:163 - Loading XML bean definitions from file [D:\apache-tomcat-6.0.26\webapps\cache\WEB-INF\classes\config\spring\monitor-service.xml] 2012-02-02 00:15:12 INFO XmlBeanDefinitionReader:163 - Loading XML bean definitions from file [D:\apache-tomcat-6.0.26\webapps\cache\WEB-INF\classes\config\spring\sys-listener.xml] 2012-02-02 00:15:13 INFO XmlWebApplicationContext:92 - Bean factory for application context [Root WebApplicationContext]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [filterChainProxy,messageSource,authenticationManager,concurrentSessionFilter,concurrentSessionController,sessionRegistry,jdbcDaoImpl,daoAuthenticationProvider,loggerListener,anonymousProcessingFilter,anonymousAuthenticationProvider,httpSessionContextIntegrationFilter,logoutFilter,securityContextHolderAwareRequestFilter,exceptionTranslationFilter,authenticationProcessingFilter,authenticationProcessingFilterEntryPoint,roleVoter,httpRequestAccessDecisionManager,filterInvocationInterceptor,propertyConfigurer,dataSource,sessionFactory,transactionManager,baseTransactionProxy,hibernateTemplate,UserDAO,AccountDAO,UserService,LoginByUserName,CommonService,AccountService,SysContextListener,ListenerManager]; root of BeanFactory hierarchy 2012-02-02 00:15:13 INFO XmlWebApplicationContext:298 - 34 beans defined in application context [Root WebApplicationContext] 2012-02-02 00:15:13 INFO PropertyPlaceholderConfigurer:179 - Loading properties file from URL [file:/D:/apache-tomcat-6.0.26/webapps/cache/WEB-INF/classes/config/jdbc_mysql.properties] 2012-02-02 00:15:13 WARN ConfigurationFactory:127 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/apache-tomcat-6.0.26/webapps/cache/WEB-INF/lib/ehcache-1.2.4.jar!/ehcache-failsafe.xml 2012-02-02 00:15:13 INFO DefaultListableBeanFactory:268 - Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [filterChainProxy,messageSource,authenticationManager,concurrentSessionFilter,concurrentSessionController,sessionRegistry,jdbcDaoImpl,daoAuthenticationProvider,loggerListener,anonymousProcessingFilter,anonymousAuthenticationProvider,httpSessionContextIntegrationFilter,logoutFilter,securityContextHolderAwareRequestFilter,exceptionTranslationFilter,authenticationProcessingFilter,authenticationProcessingFilterEntryPoint,roleVoter,httpRequestAccessDecisionManager,filterInvocationInterceptor,propertyConfigurer,dataSource,sessionFactory,transactionManager,baseTransactionProxy,hibernateTemplate,UserDAO,AccountDAO,UserService,LoginByUserName,CommonService,AccountService,SysContextListener,ListenerManager]; root of BeanFactory hierarchy] 2012-02-02 00:15:13 INFO DefaultAopProxyFactory:64 - CGLIB2 available: proxyTargetClass feature enabled 2012-02-02 00:15:13 INFO Environment:464 - Hibernate 3.0.5 2012-02-02 00:15:13 INFO Environment:477 - hibernate.properties not found 2012-02-02 00:15:13 INFO Environment:510 - using CGLIB reflection optimizer 2012-02-02 00:15:13 INFO Environment:540 - using JDK 1.4 java.sql.Timestamp handling 2012-02-02 00:15:13 INFO Configuration:1125 - configuring from url: file:/D:/apache-tomcat-6.0.26/webapps/cache/WEB-INF/classes/config/hibernate/hibernate.cfg.xml 2012-02-02 00:15:14 INFO Configuration:444 - Mapping resource: config/hibernate/monitor/User.hbm.xml 2012-02-02 00:15:14 INFO HbmBinder:260 - Mapping class: com.autonavi.monitor.model.User -> user 2012-02-02 00:15:14 INFO Configuration:444 - Mapping resource: config/hibernate/monitor/Account.hbm.xml 2012-02-02 00:15:14 INFO HbmBinder:260 - Mapping class: com.autonavi.monitor.model.Account -> account_aid 2012-02-02 00:15:14 INFO Configuration:1222 - Configured SessionFactory: null 2012-02-02 00:15:14 INFO LocalSessionFactoryBean:746 - Building new Hibernate SessionFactory 2012-02-02 00:15:14 INFO Configuration:875 - processing extends queue 2012-02-02 00:15:14 INFO Configuration:879 - processing collection mappings 2012-02-02 00:15:14 INFO Configuration:888 - processing association property references 2012-02-02 00:15:14 INFO Configuration:917 - processing foreign key constraints 2012-02-02 00:15:14 INFO ConnectionProviderFactory:53 - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@18ad183) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 120 2012-02-02 00:15:35 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState: null 2012-02-02 00:15:35 ERROR JDBCExceptionReporter:72 - Cannot create PoolableConnectionFactory (Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection timed out: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection timed out: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:281) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1696) at com.mysql.jdbc.Connection.<init>(Connection.java:408) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:270) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:822) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:748) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1099) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:400) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:321) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) ** END NESTED EXCEPTION ** ) 2012-02-02 00:15:35 WARN SettingsFactory:103 - Could not obtain connection metadata org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection timed out: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection timed out: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:281) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1696) at com.mysql.jdbc.Connection.<init>(Connection.java:408) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:270) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:822) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:748) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1099) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:400) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:321) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) ** END NESTED EXCEPTION ** ) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:822) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:748) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1099) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:400) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:321) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection timed out: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection timed out: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:281) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1696) at com.mysql.jdbc.Connection.<init>(Connection.java:408) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:270) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:822) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:748) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1099) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:400) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:182) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:202) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1054) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:321) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) ** END NESTED EXCEPTION ** at com.mysql.jdbc.Connection.createNewIO(Connection.java:1759) at com.mysql.jdbc.Connection.<init>(Connection.java:408) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:270) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221) ... 87 more 2012-02-02 00:15:35 INFO Dialect:92 - Using dialect: org.hibernate.dialect.MySQLDialect 2012-02-02 00:15:35 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions) 2012-02-02 00:15:35 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) 2012-02-02 00:15:35 INFO SettingsFactory:125 - Automatic flush during beforeCompletion(): disabled 2012-02-02 00:15:35 INFO SettingsFactory:129 - Automatic session close at end of transaction: disabled 2012-02-02 00:15:35 INFO SettingsFactory:144 - Scrollable result sets: disabled 2012-02-02 00:15:35 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): disabled 2012-02-02 00:15:35 INFO SettingsFactory:160 - Connection release mode: auto 2012-02-02 00:15:35 INFO SettingsFactory:184 - Maximum outer join fetch depth: 2 2012-02-02 00:15:35 INFO SettingsFactory:187 - Default batch fetch size: 1 2012-02-02 00:15:35 INFO SettingsFactory:191 - Generate SQL with comments: enabled 2012-02-02 00:15:35 INFO SettingsFactory:195 - Order SQL updates by primary key: disabled 2012-02-02 00:15:35 INFO SettingsFactory:334 - Query translator: org.hibernate.hql.classic.ClassicQueryTranslatorFactory 2012-02-02 00:15:35 INFO SettingsFactory:203 - Query language substitutions: {} 2012-02-02 00:15:35 INFO SettingsFactory:209 - Second-level cache: enabled 2012-02-02 00:15:35 INFO SettingsFactory:213 - Query cache: enabled 2012-02-02 00:15:35 INFO SettingsFactory:321 - Cache provider: org.hibernate.cache.EhCacheProvider 2012-02-02 00:15:35 INFO SettingsFactory:228 - Optimize cache for minimal puts: disabled 2012-02-02 00:15:35 INFO SettingsFactory:237 - Structured second-level cache entries: disabled 2012-02-02 00:15:35 INFO SettingsFactory:308 - Query cache factory: org.hibernate.cache.StandardQueryCacheFactory 2012-02-02 00:15:35 INFO SettingsFactory:261 - Statistics: disabled 2012-02-02 00:15:35 INFO SettingsFactory:265 - Deleted entity synthetic identifier rollback: disabled 2012-02-02 00:15:35 INFO SettingsFactory:279 - Default entity-mode: pojo 2012-02-02 00:15:36 INFO SessionFactoryImpl:152 - building session factory 2012-02-02 00:15:36 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured 2012-02-02 00:15:36 INFO UpdateTimestampsCache:43 - starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache 2012-02-02 00:15:36 WARN EhCacheProvider:97 - Could not find configuration [org.hibernate.cache.UpdateTimestampsCache]; using defaults. 2012-02-02 00:15:36 INFO StandardQueryCache:50 - starting query cache at region: org.hibernate.cache.StandardQueryCache 2012-02-02 00:15:36 WARN EhCacheProvider:97 - Could not find configuration [org.hibernate.cache.StandardQueryCache]; using defaults. 2012-02-02 00:15:36 INFO SessionFactoryImpl:379 - Checking 0 named queries 2012-02-02 00:15:36 INFO HibernateTransactionManager:396 - Using DataSource [org.apache.commons.dbcp.BasicDataSource@fced38] of Hibernate SessionFactory for HibernateTransactionManager 2012-02-02 00:15:37 INFO AbstractSecurityInterceptor:222 - Validated configuration attributes 2012-02-02 00:15:37 INFO ContextLoader:195 - Using context class [org.springframework.web.context.support.XmlWebApplicationContext] for root WebApplicationContext 2012-02-02 00:15:37 INFO ContextLoader:205 - Root WebApplicationContext: initialization completed in 24875 ms 2012-02-02 00:15:37 INFO SysContextListener:35 - load sys-config.xml start... 2012-02-02 00:15:37 INFO SysContextListener:41 - load sys-config.xml success 2012-02-02 00:15:37 INFO CharacterEncodingFilter:153 - Initializing filter 'encodingFilter' 2012-02-02 00:15:37 INFO CharacterEncodingFilter:178 - Filter 'encodingFilter' configured successfully 2012-02-02 00:15:37 INFO ContextLoaderPlugIn:218 - ContextLoaderPlugIn for Struts ActionServlet 'action, module '': initialization started 2012-2-2 0:15:37 org.apache.catalina.core.ApplicationContext log 信息: Initializing WebApplicationContext for Struts ActionServlet 'action', module '' 2012-02-02 00:15:37 INFO XmlBeanDefinitionReader:163 - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/config/struts/action-servlet.xml] 2012-02-02 00:15:37 INFO XmlBeanDefinitionReader:163 - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/config/struts/common-action.xml] 2012-02-02 00:15:37 INFO XmlWebApplicationContext:92 - Bean factory for application context [WebApplicationContext for namespace 'action-servlet']: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [/login,/userAction,/commonAction,/accountAction]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [filterChainProxy,messageSource,authenticationManager,concurrentSessionFilter,concurrentSessionController,sessionRegistry,jdbcDaoImpl,daoAuthenticationProvider,loggerListener,anonymousProcessingFilter,anonymousAuthenticationProvider,httpSessionContextIntegrationFilter,logoutFilter,securityContextHolderAwareRequestFilter,exceptionTranslationFilter,authenticationProcessingFilter,authenticationProcessingFilterEntryPoint,roleVoter,httpRequestAccessDecisionManager,filterInvocationInterceptor,propertyConfigurer,dataSource,sessionFactory,transactionManager,baseTransactionProxy,hibernateTemplate,UserDAO,AccountDAO,UserService,LoginByUserName,CommonService,AccountService,SysContextListener,ListenerManager]; root of BeanFactory hierarchy 2012-02-02 00:15:37 INFO XmlWebApplicationContext:298 - 4 beans defined in application context [WebApplicationContext for namespace 'action-servlet'] 2012-02-02 00:15:37 INFO DefaultListableBeanFactory:268 - Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [/login,/userAction,/commonAction,/accountAction]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [filterChainProxy,messageSource,authenticationManager,concurrentSessionFilter,concurrentSessionController,sessionRegistry,jdbcDaoImpl,daoAuthenticationProvider,loggerListener,anonymousProcessingFilter,anonymousAuthenticationProvider,httpSessionContextIntegrationFilter,logoutFilter,securityContextHolderAwareRequestFilter,exceptionTranslationFilter,authenticationProcessingFilter,authenticationProcessingFilterEntryPoint,roleVoter,httpRequestAccessDecisionManager,filterInvocationInterceptor,propertyConfigurer,dataSource,sessionFactory,transactionManager,baseTransactionProxy,hibernateTemplate,UserDAO,AccountDAO,UserService,LoginByUserName,CommonService,AccountService,SysContextListener,ListenerManager]; root of BeanFactory hierarchy] 2012-02-02 00:15:38 INFO ContextLoaderPlugIn:298 - Using context class 'org.springframework.web.context.support.XmlWebApplicationContext' for servlet 'action' 2012-02-02 00:15:38 INFO ContextLoaderPlugIn:235 - ContextLoaderPlugIn for Struts ActionServlet 'action', module '': initialization completed in 171 ms 2012-2-2 0:15:38 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory docs 2012-2-2 0:15:38 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory examples 2012-2-2 0:15:38 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 2012-2-2 0:15:38 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 2012-2-2 0:15:38 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory ROOT 2012-2-2 0:15:38 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory VirtualTerminal 2012-2-2 0:15:38 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8081 2012-2-2 0:15:38 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2012-2-2 0:15:38 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/47 config=null 2012-2-2 0:15:38 org.apache.catalina.startup.Catalina start 信息: Server startup in 27543 ms
我是把以前的项目另拷了一份,然后开始开发另外一个项目,结果,启动Tomcat时候就报上面的错误,关键信息就是:
Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection timed out: connect STACKTRACE:
找了很久才发现是我项目中关于连接数据库的配置有问题,配置文件如下:
jdbc.driverClassName=org.gjt.mm.mysql.Driver jdbc.url=jdbc\:mysql\://localhost\:3306/account_manager?useUnicode\=true&characterEncoding\=utf8 jdbc.username=root jdbc.password=root #初始化连接 dataSource.initialSize=5 #最大空闲连接 dataSource.maxIdle=10 #最小空闲连接数量 dataSource.minIdle=5 #最大连接数量 dataSource.maxActive=15 #开启池的prepared statement 池功能 poolPreparedStatements=true #是否在自动回收超时连接的时候打印连接的超时错误 dataSource.logAbandoned=true #是否自动回收超时连接 dataSource.removeAbandoned=true #超时时间(以秒数为单位) dataSource.removeAbandonedTimeout=120 #超时等待时间(毫秒) dataSource.maxWait=3000 #测试连接 dataSource.validationQuery=select 1 from test dataSource.testWhileIdle=true dataSource.testOnBorrow=true dataSource.testOnReturn=true #进行连接空闲时间判断(毫秒) dataSource.minEvictableIdleTimeMillis=1800000 #失效检查线程运行时间间隔(毫秒) dataSource.timeBetweenEvictionRunsMillis=3600000
因为此配置文件会在启动Tomcat时自动加载,里面有关于连接数据库的配置信息,还有一个测试连接信息,之所以报上面的错误是因为数据库连接不上,连接超时导致,重新修改数据库连接信息就可以了。
如果启动Tomcat时报下面这样的错误:
* BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused: connect
则是因为要连接的数据库服务没有启动
错误编号:2003
问题分析:
无法连接到 MySQL 服务器,可能的情况为:
1、MySQL 服务没有启动,一般是在异常的情况下 MySQL 无法启动导致的,比如无可用的磁盘空间,my.ini 里 MySQL 的 basedir 路径设置错误等;
2、MySQL 服务器资源紧张,导致无法连接。
解决方法:
1、如果你是虚拟主机用户(购买的空间),则联系空间商检查 MySQL 是否正常启动,并确认 MySQL 的配置信息(是否为 localhost);
2、如果你是独立主机用户(拥有管理主机权限),则按下面步骤检查:
1)检查是否启动了 MySQL 服务。
Windows 主机的话,右键点击我的电脑,单击管理,在服务和应用程序中找到 MySQL 服务,看是否是已启动的状态。
Linux主机,在控制台执行 service mysql start 启动 MySQL 服务。
2)检查磁盘空间是否还有剩余可用空间,尽量保持有足够的磁盘空间可用。
3)检查 my.ini 里的 basedir (MySQL 安装地址) 和 datadir (数据目录存放地址)等参数设置是否正确,然后重新启动下 MySQL 服务。
4)如果在刷新后偶尔能够正常显示而且服务器是Windows系统的话,那么减小Windows中TcpTimedWaitDelay时间可解决此类问题,默认情况下为240(未设置的情况下也是这个数值)此项设置需要到注册表如下位置进行设置HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpTimedWaitDelay 如果注册表中没有TcpTimedWaitDelay这个项目,请增加这个项目,并设置为双字节(DWORD)类型数值设置为30 ~ 60 之间即可