0

我正在使用带有 Eclipse 的 apache tomcat 服务器。当我将 postgresql jar 添加到 tomcat 时,它无法启动并以超时结束并显示以下消息:“本地主机上的服务器 Tomcat v7.0 服务器无法在 45 秒内启动。如果服务器需要更多时间,请尝试在服务器编辑器”。控制台输出如下所示:

    Sep 04, 2013 12:39:50 AM org.apache.catalina.core.AprLifecycleListener init
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 (x86)\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre7/bin/client;C:/Program Files (x86)/Java/jre7/bin;C:/Program Files (x86)/Java/jre7/lib/i386;C:\Program Files\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Windows\system32\gs\gs8.71\bin;C:\svn\bin;E:\apache-maven-3.0.5\bin;C:\Program Files\Java\jdk1.7.0_02\bin;C:\JExcel;C:\Program Files (x86)\OpenSSH\bin;C:\osmdata;C:\osm2pgsql;C:\osm2pgsql\x64\;C:\Program Files\MATLAB\R2010a\runtime\win64;C:\Program Files\MATLAB\R2010a\bin;E:\eclipse;;.
Sep 04, 2013 12:39:50 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:scriptsynth' did not find a matching property.
Sep 04, 2013 12:39:50 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 04, 2013 12:39:50 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 04, 2013 12:39:50 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1162 ms
Sep 04, 2013 12:39:50 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 04, 2013 12:39:50 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.41
Sep 04, 2013 12:39:57 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Sep 04, 2013 12:39:57 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
00:39:57.572 [localhost-startStop-1] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization started
00:39:57.761 [localhost-startStop-1] INFO  o.s.w.c.s.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Wed Sep 04 00:39:57 IST 2013]; root of context hierarchy
00:39:57.884 [localhost-startStop-1] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [applicationContext.xml]
00:39:58.656 [localhost-startStop-1] INFO  o.s.w.c.s.XmlWebApplicationContext - Bean 'org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter#1c212b0' of type [class org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
00:39:58.727 [localhost-startStop-1] INFO  o.s.w.c.s.XmlWebApplicationContext - Bean 'dataSource' of type [class org.springframework.jndi.JndiObjectFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
00:39:58.727 [localhost-startStop-1] INFO  o.s.w.c.s.XmlWebApplicationContext - Bean 'dataSource' of type [class org.apache.tomcat.dbcp.dbcp.BasicDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
00:39:58.752 [localhost-startStop-1] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'default'
00:39:59.167 [localhost-startStop-1] INFO  o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
00:39:59.182 [localhost-startStop-1] INFO  org.hibernate.Version - HHH000412: Hibernate Core {4.2.5.Final}
00:39:59.185 [localhost-startStop-1] INFO  org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found
00:39:59.188 [localhost-startStop-1] INFO  org.hibernate.cfg.Environment - HHH000021: Bytecode provider name : javassist
00:39:59.236 [localhost-startStop-1] INFO  org.hibernate.ejb.Ejb3Configuration - HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
00:39:59.461 [localhost-startStop-1] INFO  o.h.s.j.c.i.ConnectionProviderInitiator - HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

当我从 tomcat 的 lib 文件夹中删除 postgresql jar 时,它像以前一样开始正常。

PostgreSQL 似乎正在运行,因为我可以从 pgAdmin 连接到它

有想法该怎么解决这个吗?

4

1 回答 1

1

嘿,我遇到了同样的问题,我希望这可以帮助我刚刚在 Tomcat 目录中添加了一个新 jar....400 kb一个小的。我在tomcat/lib/目录中从大到小排序,我得到的开始时间加倍30 seconds to 60 seconds。快把我逼疯了。后来我将目录从小到大排序tomcat/lib/并取回我的 32 秒,我认为这就是问题所在,branch prediction请看一下这个主题。

为什么处理排序数组比处理未排序数组更快?

http://en.wikipedia.org/wiki/Branch_predictor

我希望真的可以帮助某人..

于 2013-09-26T20:40:10.447 回答