Exception in thread "main" java.lang.LinkageError错误的解决
来源:互联网 发布:中孚网络隔离卡驱动 编辑:程序博客网 时间:2024/06/10 03:46
在用myeclipse6.5 jdk1.5的环境。建立一个web项目,然后运行main方法调试jaxb程序报错----------------------------------
Exception in thread "main" java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/D:/workspace/A8_Common/webapp/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
-------------------------------
解决办法如下:首先在main函数中输出兼容包的目录所在:
System.out.println(System.getProperty("java.endorsed.dirs"));
我的路径为:D:\jdk15\lib\endorsed
然后到这个目录的上层(这里为lib目录)建立endorsed文件夹,拷贝文件jaxb-api.jar和jaxws-api.jar到endorsed文件夹,OK搞定~~~~~
----------------------------------------------------
方法二:
仔细看英文,就可以发现是因为jar包版本不对,所以也可以通过重装jdk来解决~~~
方法三: javaee.jar 删掉
- Exception in thread "main" java.lang.LinkageError错误的解决
- Exception in thread "main" java.lang.LinkageError错误的解决
- Exception in thread "main" java.lang.NoClassDefFoundError
- jcreater Exception in thread "main" java.lang.NoClassDefFoundErr
- Java中关于“Exception in thread "main" java.lang.NoClassDefFound Error
- java运行时出现“Exception in thread"main"java.lang.NoSuchMethodError:m
- JDK版本问题Exception in thread "main" java.lang.UnsupportedClassVe
- 有关出现问题Exception in thread "main" java.lang.NoClassDefFou
- Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/Static
- Exception in thread "main" java.io.IOException: Cannot run program "XX": CreateP
- jogl 拒绝访问Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError:
- Exception in thread "main" java.lang.NoClassDefFoundError:错误 如何解决?
- Exception in thread "main" java.lang.NoClassDefFoundError错误解决
- Exception in thread "main" java.lang.NoClassDefFoundError错误解决
- Exception in thread "main" java.lang.NoClassDefFoundError错误解决
- "Exception in thread "main" java.lang.NoClassDefFoundError"错误的原因
- Eclipse 报 “Exception in thread "main" java.lang.OutOfMemoryError: Java heap space ”错误的解决
- Exception in thread "main" java.lang.NoClassDefFoundError问题的解决
- java.lang.NoSuchMethodError: javax.xml.ws.WebFault.messageName()Ljava/lang/Strin
- struts2 ognl java.lang.NoSuchMethodException Ljava.lang.String
- WSServletContextListener jax-ws 源码分析
- happens befor 原则?
- org.xml.sax.SAXParseException: Content is not allowed in trailing section
- Exception in thread "main" java.lang.LinkageError错误的解决
- Android WebView开发问题及优化汇总
- com.bea.xml.XmlException: failed to load java type corresponding to e=web-app@ht
- java file 海量文件处理
- java 线程池详解
- App架构经验总结
- 现在有1千万个随机数,随机数的范围在1到1亿之间。现在要求写出一种算法,将1到1亿之间没有在随机数中的数求出来
- iOS 项目的目录结构能看出你的开发经验
- ORACLE SQL Loader