posts - 2, comments - 27, trackbacks - 0, articles - 60
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

eWebEditor在JBOSS下无法显示的问题

Posted on 2009-04-08 09:40 ZhouFeng 阅读(665) 评论(0)  编辑  收藏 所属分类: 转载Web开发Web服务器
在将一个Tomcat项目迁移到JBOSS时,出现了一点问题,就是配置好的eWebEditor不能用了,控制台里报以下的错误
Exception in JSP: /eWebEditor.jsp:54
经过一番折腾后又发现了如下的出错提示
java.lang.NoClassDefFoundError: org/dom4j/xpath/DefaultXPath
后来发现是dom4j.jar版本不对造成的问题,JBOSS自带的版本会出现上述的情况
解决方法如下:
将eWebEditor里自带的dom4j.jar(476K)的文件覆盖掉jboss4\lib\dom4j.jar(297K)即可,本文参考以下的材料

The error "java.lang.NoClassDefFoundError: org/dom4j/xpath/DefaultXPath" underlines important changes to the dom4j XML library. It usually happens when you try to call this library's methods in runtime. Older versions that shipped with JBoss used to include Jaxen, but for whatever reason, it is no longer included. Users must download dom4j.jar (now at version 1.6.1) and then jaxen-full.jar (FCS-1.0). Now how to resolve this problem is tricky:

   1. Put dom4j-1.3.jar in {jboss}/lib. This version is known good.
   2. Put dom4j-1.6.1.jar and jaxen-full.jar in {jboss}/server/default/lib. Remove the old dom4j JARs that may exist in that directory.

The reason the newer version cannot be used with JBoss is unknown, but it does not work. The older version is used when reading JBoss-specific config files. The newer version of dom4j kicks in when the default server is initialized. This allows development of applications using newer versions of the XML API.

http://prideafrica.blogspot.com/2006/05/javalangnoclassdeffounderror.html


只有注册用户登录后才能发表评论。


网站导航: