我web項目被正常使用,它包括:spring3和Hibernate3的。由日食重構的幫助日食重命名一些包後,tomcat的便無法啓動了。它掛在下面這些日誌:的Tomcat Web應用程序的啓動過程中掛起
......
......
......
2012-02-29 08:57:04,552 INFO [org.springframework.orm.hibernate3.LocalSessionFactoryBean] [buildSessionFactory] - <Building new Hibernate SessionFactory>
2012-02-29 08:57:04,567 INFO [org.hibernate.connection.ConnectionProviderFactory] [newConnectionProvider] - <Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider>
2012-02-29 08:57:10,698 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <RDBMS: MySQL, version: 5.0.77>
2012-02-29 08:57:10,698 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.15 (Revision: ${bzr.revision-id})>
2012-02-29 08:57:10,729 INFO [org.hibernate.dialect.Dialect] [<init>] - <Using dialect: org.hibernate.dialect.MySQLDialect>
2012-02-29 08:57:10,745 INFO [org.hibernate.transaction.TransactionFactoryFactory] [buildTransactionFactory] - <Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory>
2012-02-29 08:57:10,745 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] [getTransactionManagerLookup] - <No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Automatic flush during beforeCompletion(): disabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Automatic session close at end of transaction: disabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <JDBC batch size: 15>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <JDBC batch updates for versioned data: disabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Scrollable result sets: enabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <JDBC3 getGeneratedKeys(): enabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Connection release mode: auto>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Maximum outer join fetch depth: 2>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Default batch fetch size: 1>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Generate SQL with comments: disabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Order SQL updates by primary key: disabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Order SQL inserts for batching: disabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [createQueryTranslatorFactory] - <Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory>
2012-02-29 08:57:10,745 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] [<init>] - <Using ASTQueryTranslatorFactory>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Query language substitutions: {}>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <JPA-QL strict compliance: disabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Second-level cache: enabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Query cache: disabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [createRegionFactory] - <Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Optimize cache for minimal puts: disabled>
2012-02-29 08:57:10,745 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Structured second-level cache entries: disabled>
2012-02-29 08:57:10,761 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Statistics: disabled>
2012-02-29 08:57:10,761 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Deleted entity synthetic identifier rollback: disabled>
2012-02-29 08:57:10,761 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Default entity-mode: pojo>
2012-02-29 08:57:10,761 INFO [org.hibernate.cfg.SettingsFactory] [buildSettings] - <Named query checking : enabled>
2012-02-29 08:57:10,792 INFO [org.hibernate.impl.SessionFactoryImpl] [<init>] - <building session factory>
2012-02-29 08:57:11,244 INFO [org.hibernate.impl.SessionFactoryObjectFactory] [addInstance] - <Not binding factory to JNDI, no JNDI name configured>
2012-02-29 08:57:11,307 INFO [org.springframework.orm.hibernate3.HibernateTransactionManager] [afterPropertiesSet] - <Using DataSource [[email protected]] of Hibernate SessionFactory for HibernateTransactionManager>
它掛在這裏,當Tomcat的 「啓動超時」 達到tomcat的停止。我增加了超時爲100秒,但它是無用的,其中應用仍掛在最長的時間! 最奇怪的是,沒有任何錯誤,它只是掛起。我嘗試了很多次清理/刪除服務器和清理/構建項目,但沒有結果。
編輯:
之前重構日誌繼續像下面這樣:
2012-02-29 07:52:39,822 INFO [org.springframework.ws.soap.saaj.SaajSoapMessageFactory] [afterPropertiesSet] - <Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol>
2012-02-29 07:52:39,853 INFO [org.springframework.oxm.jaxb.Jaxb2Marshaller] [createJaxbContextFromContextPath] - <Creating JAXBContext with context path [aheeva.webService.oxm]>
2012-02-29 07:52:40,571 INFO [org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping] [registerHandler] - <Mapped URL path [
.......
.......
.......
編輯:
我得到以下輸出的線程轉儲:
"main" prio=5 tid=0x001f9dc8 nid=0xf8c runnable [0x000bf000..0x000cfc00]
at java.lang.String.equals(String.java:858)
at java.util.HashMap.eq(HashMap.java:277)
at java.util.HashMap.getEntry(HashMap.java:363)
at java.util.LinkedHashMap.get(LinkedHashMap.java:273)
at org.springframework.beans.CachedIntrospectionResults.getPropertyDescr
iptor(CachedIntrospectionResults.java:275)
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorIntern
al(BeanWrapperImpl.java:335)
at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrap
perImpl.java:407)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:222)
- locked <0x24682be0> (a java.util.concurrent.ConcurrentHashMap)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getType
ForFactoryBean(AbstractBeanFactory.java:1343)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:678)
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeM
atch(AbstractBeanFactory.java:507)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeanNamesForType(DefaultListableBeanFactory.java:317)
at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIn
cludingAncestors(BeanFactoryUtils.java:185)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
findAutowireCandidates(DefaultListableBeanFactory.java:829)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
doResolveDependency(DefaultListableBeanFactory.java:786)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
resolveDependency(DefaultListableBeanFactory.java:703)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j
ava:474)
.......
.......
.......
我可以得出以下結論:
它總是相同春天的HashMap在單模式試圖獲取一個bean並不能找到這個原因線程是鎖定 ...非常非常奇怪!不得有對一個例外或超時拋?奇怪的春天架構!
不顯示只是INFO日誌,但錯誤 – Xorty 2012-02-29 09:59:13
30或60秒後會超時嗎?它可以連接到數據庫? – mindandmedia 2012-02-29 09:59:17
從工作區中刪除該tomcat並添加一個新的,然後再試一次:) – 2012-02-29 10:00:31