当一个几乎相同的应用程序在同一个Tomcat实例中启动时,为什么Tomcat webapp失败? [英] Why is a Tomcat webapp failing when an almost identical app starts within the same Tomcat instance?

查看:180
本文介绍了当一个几乎相同的应用程序在同一个Tomcat实例中启动时,为什么Tomcat webapp失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Linux上的Tomcat 5.5.27下遇到了一些奇怪的webapp部署行为(在生产中的CentOS和用于开发的Ubuntu 10.04上)。

We're experiencing slightly strange webapp deployment behaviour under Tomcat 5.5.27 on Linux (both on CentOS in production and Ubuntu 10.04 for development).

App A和app B几乎完全相同(完全相同的库,复制的Maven项目),App B的不同之处仅在于它的JPA实体被注释为访问同一模式中的不同表(JNDI数据库引用是相同的)。

App A and app B are almost identical (exactly the same libraries, a copied Maven project), App B differs only in that its JPA entities are annotated to access a different table within the same schema (the JNDI database references are identical).

当应用程序部署到任一环境中时,应用B将 启动。但是:

When the apps are deployed into either environment, app B will not start. However:


  1. 从Tomcat管理控制台手动启动停滞的应用程序,工作正常(???)。

  2. 在尝试重新启动Tomcat之后,按字母顺序排列的应用程序无法启动。点#1仍然有效(???)

  3. 记录 配置(log4j),但是,我们从[尚未开始]中得不到任何结果应用程序B的日志记录,以及Tomcat的ca​​talina.out日志文件中的错误(NB。记录 在应用程序启动并运行后正常工作)。

  1. Manually starting the stalled app, from the Tomcat admin console, works fine (???).
  2. After any attempt to restart Tomcat, the alphabetically later app fails to start. Point #1 still remains valid (???)
  3. Logging is configured (log4j), however, we get nothing from [the yet-to-start] app B's logging, nor errors from Tomcat's 'catalina.out' log file (NB. logging is working once the apps are up and running).

我已经对信息进行了相当彻底的搜索(Apache / Tomcat bugzilla,Google),但我发现没有任何实际用途。其他帖子已经看到使用antijarlocking和antiresourcelocking属性在服务器的'context.xml''Context'节点上,但也有一个建议,这在Linux下是不必要的/无效的(在这里似乎也没有用)。

I've done a reasonably thorough search for information (Apache/Tomcat bugzilla, Google) but I've found nothing of real use. Other posts have sighted the use of the antijarlocking and antiresourcelocking attributes on the server's 'context.xml' 'Context' node, but there is also a suggestion that this is unecessary/inaffective under Linux (hasn't appeared to work here, either).

任何想法?

干杯

PS目前不支持从Tomcat 5.5.x升级(IT支持等)。

P.S. Upgrading from Tomcat 5.5.x isn't an option, currently (IT support etc.).

推荐答案

在tomcat上弹出应用程序有类似的行为。 - 它们要求webAppRootKey对于每个应用程序都是唯一的。 - 如果不是应用程序的行为与您描述的相同,那么在Spring应用程序的情况下,请确保App-A有另一个webAppRootKey,然后是App-B。

There is a similar behavior to spring applications on tomcat. -- They require that the webAppRootKey is unique for each application. -- If not the applications behave like you described, so in case of Spring apps, make sure that App-A has an other webAppRootKey then App-B.

<context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>myRootKey</param-value>
</context-param>

@See http://groups.google.com/group/riotfamily/browse_thread/thread/9a0edf69575d3ab6?pli=1

这篇关于当一个几乎相同的应用程序在同一个Tomcat实例中启动时,为什么Tomcat webapp失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆