将应用程序部署到Glassfish 3时出错

时间:2012-05-30 12:19:34

标签: eclipse glassfish-3

当我尝试将名为shopping-1的应用程序部署到Glassfish 3时,出现以下错误:

'Publishing to GlassFish Server Open Source Edition 3 (Java EE 6)2 at localhost...'has encountered a problen.

cannot Deploy shopping-1
Deployment Error for module: shopping-1: Exception while loading the app :
  java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start:
  org.apache.catalina.LifecycleException:
  org.apache.catalina.LifecycleException:
  java.lang.ClassNotFoundException:
  org.springframework.web.servlet.DispatcherServlet

如何追踪并解决此问题?

2 个答案:

答案 0 :(得分:0)

显然shopping-1.war文件不包含包含DispatcherServlet类的存档。

unzip -l shopping-1.war | grep spring(在Linux上)将为您提供所有与弹簧相关的包含jar文件的列表

答案 1 :(得分:0)

  1. 首先运行appserver管理员列表应用程序
  2. 检查服务器上是否有已部署的应用程序。
  3. 如果有则运行它们取消部署。
  4. 停止应用程序服务器。
  5. 打开您拥有用于部署的war文件的位置文件夹
  6. 检查一次只有一个war文件。 7.启动应用程序服务器
  7. 部署战争。
  8. 应该可以正常工作。