我使用 spring-mvc-quickstart-archetype(包括 spring mvc、spring security、hibernate)创建了两个 Spring MVC 应用程序,我可以在 tomcat 上单独运行每个应用程序,但不能一起运行。
当我将两个项目都添加到 Tomcat 时,服务器不会出现,我得到
Aug 30, 2013 8:14:48 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'appServlet'
然后下一行是红色文本中的错误,如下所示,然后服务器被终止
Exception in thread "main"
我在 logback.xml 上将 Spring 日志级别启用为 DEBUG,它使用 DEBUG 和 INFO 写入一堆日志消息,但没有任何 WARN 或 ERROR 显示对内部发生的事情的任何洞察。
有没有人遇到过这个问题并找到了解决方案?
按照建议添加日志
Sep 13, 2013 8:20:24 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:\Programs\Java\jdk1.7.0_21\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Programs/Java/jdk1.6.0_32/bin/../jre/bin/server;C:/Programs/Java/jdk1.6.0_32/bin/../jre/bin;C:/Programs/Java/jdk1.6.0_32/bin/../jre/lib/amd64;c:\Python27;C:\Programs\Java\jdk1.6.0_32\bin;C:\Programs\apache-maven-3.0.4\bin;c:\Programs\mongodb243\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Programs\eclipse-jee-juno -with-SpringToolSuit;;.
Sep 13, 2013 8:20:24 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:shows' did not find a matching property.
Sep 13, 2013 8:20:24 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:com.maha.science.web' did not find a matching property.
Sep 13, 2013 8:20:24 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-7080"]
Sep 13, 2013 8:20:24 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-7009"]
Sep 13, 2013 8:20:24 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 705 ms
Sep 13, 2013 8:20:25 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 13, 2013 8:20:25 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.25
Sep 13, 2013 8:20:31 AM org.apache.catalina.core.ApplicationContext log
INFO: Spring WebApplicationInitializers detected on classpath: [com.maha.science.config.WebAppInitializer@c2854c7]
Sep 13, 2013 8:20:31 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Sep 13, 2013 8:20:35 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'appServlet1'
Exception in thread "main"