启动 tomcat 时的错误日志。我在 tomcat/webapps 目录中有一个 wookie webapp。
org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory wookie
org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
这是 web.xml 中与监听器相关的三行
<listener>
<listener-class>
org.apache.wookie.server.ContextListener
</listener-class>
</listener>
<listener>
<listener-class>
org.directwebremoting.servlet.EfficientShutdownServletContextAttributeListener
</listener-class>
</listener>
<listener>
<listener-class>
org.directwebremoting.servlet.EfficientShutdownServletContextListener
</listener-class>
</listener>
你们当中有人能理解吗?
我有更多信息
org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.apache.wookie.server.ContextListener
java.lang.IllegalStateException: Transaction not initiated or already closed
at org.apache.wookie.beans.jpa.JPAPersistenceManager.close(JPAPersistenceManager.java:335)
at org.apache.wookie.beans.util.PersistenceManagerFactory.closePersistenceManager(PersistenceManagerFactory.java:312)
at org.apache.wookie.beans.util.PersistenceManagerFactory.initialize(PersistenceManagerFactory.java:256)
at org.apache.wookie.server.ContextListener.contextInitialized(ContextListener.java:105)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4780)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:557)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1124)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1047)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:542)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:355)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:313)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:293)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:996)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:771)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:988)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:427)
更新::: 解决方案
上述错误是由于我的电脑中的 servletEngine.context.conf.dir 路径不正确而引起的。 servletEngine.context.conf.dir=CATALINA_HOME/conf (不正确)
servletEngine.context.conf.dir=CATALINA_HOME/conf/Catalina/localhost (正确)
conf 之后需要 /Catalina/localhost
答案1
您是否已按照此列表完成部署 Web 应用程序之前的所有先决条件步骤?
答案2
您检查过磁盘空间吗?我在部署 Web 应用时遇到了类似的问题,发现我的 /var 分区已达到 100%,并发出了此类警告。