为什么我的 servlet 在 TomCat 6.0.18 上无法加载,但在 5.5 上加载正常
我有一个使用 TomCat 5.5 的开发环境,并且我的应用程序运行良好。一旦将所有内容传输到运行 TomCat 6.0.18 的部署服务器,名为 DeviceComm 的 servlet 类似乎就不会加载。我在“资源不可用”中遇到的错误。
我最近对这个类进行了修改。转移只是更新,之前一切正常。基本上,问题是:什么可以使 servlet 在 tomcat 版本 6 上无法工作而在 5.5 上正常工作?
谢谢!
I have a development environment where i use TomCat 5.5 and my application works fine. As soon as a transfer everything to a deployment server, that's running TomCat 6.0.18, a servlet class called DeviceComm doesn't seem to load. The error that i'm getting in "Ressource not available".
I have brought modifications to this class recently. The transfer was only an update, everything was working fine before. Basically, the question is: what can make a servlet not work on version 6 of tomcat and work fine on 5.5 ?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
问题解决了!部署 .class 文件与开发环境中的文件不同。 SourceSafe 中的错误!
Problem solved! The deployment .class files were not the same as the ones on the development environment. Bug in SourceSafe!
如果 Tomcat 5.5 在 Java 5 上运行而 Tomcat 6 在 Java 6 上运行,也可能是 JDK 版本不匹配
Could also be a JDK version mismatch if your Tomcat 5.5 runs on Java 5 and the Tomcat 6 runs on Java 6
确保您没有将
server.xml
文件从 5.5 复制到 6.0。 6.0 中有很多细微的差异,导致 5.5server.xml
无法加载。确保将配置更改应用到 tomcat 发行版附带的 6.0 模板。
Make sure you just did not copy your
server.xml
file from 5.5 to 6.0. There are quite a few subtle differences in 6.0 that makes 5.5server.xml
to not load.Make sure that you apply your configuration changes to 6.0 template that comes with tomcat distribution.
这可能是由一切原因造成的。阅读服务器启动日志。它位于
/logs
文件夹中,文件名为domainname.yyyy-MM-dd.log
。它将包含服务器启动和 servlet 初始化期间发生的任何异常/问题。That can be caused by everything. Read the server startup logs. It's located in the
/logs
folder with the filenamedomainname.yyyy-MM-dd.log
. It'll contain any exceptions/problems which are occurred during server startup and servlet initialization.