今天同事在换CMS的Seam开发环境的时候,一运行就出现下面这些错误信息:
ERROR [[/cms]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener java.lang.RuntimeException: error while reading /WEB-INF/components.xml
Caused by: java.lang.IllegalArgumentException: Exception setting property org.jboss.seam.core.init.jndiPattern on component org.jboss.seam.core.init. Expression @jndiPattern@ evaluated to null.
Caused by: java.lang.IllegalArgumentException: null value
org.jboss.deployment.DeploymentException: URL file:/E:/DevelopmentPlatform/jboss-4.2.2.GA/server/default/deploy/cms-ear.ear/cms.war/ deployment failed
17:50:30,171 ERROR [MainDeployer] Could not start deployment: file:/E:/DevelopmentPlatform/jboss-4.2.2.GA/server/default/deploy/cms-ear.ear/cms.war/ org.jboss.deployment.DeploymentException: URL file:/E:/DevelopmentPlatform/jboss-4.2.2.GA/server/default/deploy/cms-ear.ear/cms.war/ deployment failed
我们找了很多的方法都没有找到原因出现在什么地方,最后经过一番的努力终于找到问题所在。
同时伴随这个问题存在的另外一个现象就是:我们的cms-ejb这个文件夹和cms-ear是并列的,它并没有在cms-ear的里面,这个问题就很奇怪。这个是个现象。
解决办法:原来是在cms-ear这个工程中,你点击右键选择Properties--->再选择Java EE Module Dependenci这个选项列表中,他把最下面的cms-ejb.jar这个文件没有选中(打钩),现在选中后,再次运行就可以成功了,另外那个奇怪的现象也消失了,即cms-ejb这个文件也在csm-ear的里面了。