2015-02-12 37 views
0

參考前面的問題時: Hibernate 4 + Spring 4 + Maven + Apache Tomcat 8.0 init failedTomcat的超時啓動(春行家休眠)

我創建了一個全新的項目,現在的Tomcat甚至不運行。它在45秒後超時(我已將其更改爲180,但仍然超時)。這是控制檯輸出。它會在最後一行之後「卡住」。什麼可能導致問題?

lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Server version:  Apache Tomcat/8.0.17 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Server built:   Jan 9 2015 15:58:59 UTC 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Server number:   8.0.17.0 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: OS Name:    Windows 8.1 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: OS Version:   6.3 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Architecture:   amd64 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: JAVA_HOME:    C:\Program Files\Java\jre1.8.0_25 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: JVM Version:   1.8.0_25-b18 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: JVM Vendor:   Oracle Corporation 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: CATALINA_BASE:   C:\Users\Tomek\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: CATALINA_HOME:   C:\Program Files\Apache Software Foundation\Tomcat 8.0 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Dcatalina.base=C:\Users\Tomek\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Dwtp.deploy=C:\Users\Tomek\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.VersionLoggerListener log 
INFO: Command line argument: -Dfile.encoding=Cp1250 
lut 12, 2015 2:10:54 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent 
INFO: 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\jre1.8.0_25\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_31/bin/server;C:/Program Files/Java/jre1.8.0_31/bin;C:/Program Files/Java/jre1.8.0_31/lib/amd64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Tomek\Desktop\eclipse;;. 
lut 12, 2015 2:10:54 AM org.apache.coyote.AbstractProtocol init 
INFO: Initializing ProtocolHandler ["http-nio-8080"] 
lut 12, 2015 2:10:54 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 
INFO: Using a shared selector for servlet write/read 
lut 12, 2015 2:10:54 AM org.apache.coyote.AbstractProtocol init 
INFO: Initializing ProtocolHandler ["ajp-nio-8009"] 
lut 12, 2015 2:10:54 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 
INFO: Using a shared selector for servlet write/read 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.Catalina load 
INFO: Initialization processed in 551 ms 
lut 12, 2015 2:10:54 AM org.apache.catalina.core.StandardService startInternal 
INFO: Starting service Catalina 
lut 12, 2015 2:10:54 AM org.apache.catalina.core.StandardEngine startInternal 
INFO: Starting Servlet Engine: Apache Tomcat/8.0.17 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.HostConfig deployDescriptor 
INFO: Deploying configuration descriptor C:\Users\Tomek\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\HelloWorld.xml 
lut 12, 2015 2:10:54 AM org.apache.catalina.startup.SetContextPropertiesRule begin 
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:HelloWorld' did not find a matching property. 
lut 12, 2015 2:10:57 AM org.apache.catalina.core.ApplicationContext log 
INFO: No Spring WebApplicationInitializer types detected on classpath 
lut 12, 2015 2:10:57 AM org.apache.catalina.core.ApplicationContext log 
INFO: Initializing Spring root WebApplicationContext 
lut 12, 2015 2:10:57 AM org.springframework.web.context.ContextLoader initWebApplicationContext 
INFO: Root WebApplicationContext: initialization started 
lut 12, 2015 2:10:57 AM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh 
INFO: Refreshing Root WebApplicationContext: startup date [Thu Feb 12 02:10:57 CET 2015]; root of context hierarchy 
lut 12, 2015 2:10:57 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml] 
lut 12, 2015 2:10:58 AM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit> 
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final} 
lut 12, 2015 2:10:58 AM org.hibernate.Version logVersion 
INFO: HHH000412: Hibernate Core {4.3.6.Final} 
lut 12, 2015 2:10:59 AM org.hibernate.cfg.Environment <clinit> 
INFO: HHH000206: hibernate.properties not found 
lut 12, 2015 2:10:59 AM org.hibernate.cfg.Environment buildBytecodeProvider 
INFO: HHH000021: Bytecode provider name : javassist 

回答

0

原來我曾在這裏定義錯誤的端口,本來應該是5342而不是8080:

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> 
    <property name="driverClassName" value="org.postgresql.Driver"/> 
    <property name="url" value="jdbc:postgresql://localhost:5342/testdb"/> 
    <property name="username" value="postgres"/> 
    <property name="password" value="im not that stupid"/> 
    <property name="initialSize" value="3" /> 
    <property name="maxActive" value="10" /> 
</bean>