2014-11-20 135 views
-1

我已經開始研究安裝了Eclipse Luna和Tomcat 7.0的Web應用程序項目。環境也有JRE 8.但是每當我啓動服務器時,它都會超時!無法在Eclipse中啓動Tomcat 7.0 Luna

在控制檯中我得到:

nov. 20, 2014 11:08:20 PM org.apache.catalina.core.AprLifecycleListener init 
 
INFOS: 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\jre8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Android;C:\Program Files\Java\jre8\bin;C:\Program Files\Java\jdk1.8.0\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\ooc\bin;C:\JacORB1_4\bin;;. 
 
nov. 20, 2014 11:08:21 PM org.apache.tomcat.util.digester.SetPropertiesRule begin 
 
AVERTISSEMENT: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:GestionDesFormationsWebAppMavenized' did not find a matching property. 
 
nov. 20, 2014 11:08:21 PM org.apache.coyote.AbstractProtocol init 
 
INFOS: Initializing ProtocolHandler ["http-bio-8080"] 
 
nov. 20, 2014 11:08:21 PM org.apache.coyote.AbstractProtocol init 
 
INFOS: Initializing ProtocolHandler ["ajp-bio-8009"] 
 
nov. 20, 2014 11:08:21 PM org.apache.catalina.startup.Catalina load 
 
INFOS: Initialization processed in 567 ms 
 
nov. 20, 2014 11:08:21 PM org.apache.catalina.core.StandardService startInternal 
 
INFOS: Démarrage du service Catalina 
 
nov. 20, 2014 11:08:21 PM org.apache.catalina.core.StandardEngine startInternal 
 
INFOS: Starting Servlet Engine: Apache Tomcat/7.0.56 
 
nov. 20, 2014 11:08:22 PM org.apache.catalina.core.ApplicationContext log 
 
INFOS: Set web app root system property: 'webapp.root' = [C:\Users\Meriem\workspaceJEE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\GestionDesFormationsWebAppMavenized\] 
 
nov. 20, 2014 11:08:22 PM org.apache.catalina.core.ApplicationContext log 
 
INFOS: Initializing log4j from [classpath:log4j.xml] 
 
nov. 20, 2014 11:08:22 PM org.apache.catalina.core.ApplicationContext log 
 
INFOS: Initializing Spring FrameworkServlet 'spring' 
 
INFO : org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'spring': initialization started 
 
INFO : org.springframework.web.context.support.XmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'spring-servlet': startup date [Thu Nov 20 23:08:22 WET 2014]; root of context hierarchy 
 
INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-servlet.xml] 
 
INFO : org.springframework.context.annotation.ClassPathBeanDefinitionScanner - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning 
 
INFO : org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/jdbc.properties] 
 
INFO : org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.s[email protected]721bcc07: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,studentController,studentDaoImpl,studentServiceImpl,propertyConfigurer,dataSource,sessionFactory,viewResolver,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,transactionManager]; root of factory hierarchy

我試圖像增加超時時段,更改端口號,卸載&重新安裝在這個論壇中的其他問題提出的解決方案Tomcat,改變服務器的'publisiing'選項,但似乎沒有任何工作。

任何幫助將真誠讚賞。

回答

0

超時意味着Tomcat沒有進入應用程序完成啓動階段。否則,它會向Eclipse發送成功或失敗的信號。由於最後一行是關於Spring初始化一些bean的,我的第一個想法是你有一些掛在無限循環或死鎖上的構造後構造器(@PostConstruct,InitializingBean.afterPropertiesSet)。

檢查您自己的bean(studentController,studentDaoImpl,studentServiceImpl)是否存在掛起的初始化程序。也許創建一些初始化器(使用@PostConstruct,它更簡單)並添加一些日誌輸出以確保您的bean實際上正在初始化。如果您不得不將超時設置爲20-30分鐘或更長時間,請爲您使用的版本獲取Spring源代碼,然後實際瀏覽Spring的初始化代碼。它看起來像甚至沒有得到sessionFactory(我假設是爲Hibernate)。

+0

謝謝你的回答,但我測試了相同版本的tomcat和eclipse在另一臺筆記本電腦上的相同代碼,它的工作原理。我不認爲在代碼中的問題。 – 2014-11-21 17:29:14

相關問題