Eclipse集成jboss-5.0.0.GA的时候出现的java.lang.LinkageError错误

MyEclipse集成JBOSS5.0的时候启动JBOSS的时候出现了下面的API错误信息:

java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/E:/java/apache-tomcat-6.0.26/webapps/ejbClient/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
到sun公司的上面的一个网址后解释信息如下:

Endorsed Standards Classes Deployment

Classes implementing newer versions of endorsed standards should be placed in JAR files. The system property java.endorsed.dirs specifies one or more directories that the Java runtime environment will search for such JAR files. If more than one directory path is specified by java.endorsed.dirs, they must be separated by File.pathSeparatorChar. If no value is set for java.endorsed.dirs, then Sun Microsystem's implementation of the Java platform looks for JAR files in a default standard location:
<java-home>\lib\endorsed[Microsoft Windows]
<java-home>/lib/endorsed[Solaris or Linux]
Here <java-home> refers to the directory where the runtime software is installed (which is the top-level directory of the J2SE Runtime Environment or the jre directory in the JDK).

The J2SE runtime environment will use classes in such JAR files to override the corresponding classes provided in the Java platform as shipped by Sun.

jboss-5.0.0.GA\lib\endorsed目录下的jaxb-api.jar这个jar文件放到JDK的Java\jdk1.6.0\jre\lib这个目录下的的endorsed目录中供类加载器加载;操作就是在jre/lib目录中新建一个endorsed目录,然后把上面的那个jaxb-api.jar放到这个目录中,重新启动jboss就可以解决这个问题了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值