最近用Groovy编写测试脚本的时候,出现一个问题,在Groovy 1.5.7下面 groovy会读取jdk下面自带的一个dom处理包(org.w3c.dom),会和groovy脚本里面用到的watij库里面自带的xml-apis.jar冲突,因为版本不一样.
报的错如下:
Caught: java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/w3c/dom/NamedNodeMap"
网上查了资料 搞了很久,最后查到http://jira.codehaus.org/browse/GROOVY-3356,发现症状一样 原来是groovy一个bug,目前该bug的状态是open,该bug的相关描述:
With Groovy versions 1.5.7 onwards there is a problem where Groovy loads
DOM classes from the Java SDK in its RootLoader constructor.
This makes it incompatible with XML parsing libraries having different
versions of DOM interfaces. For example, with Oracle XML Parser I get:
既然还没有修复,我尝试退到groovy 1.5.6,恩 不再报错,看来是1..5.7自己的问题。
算了,先用1.5.6吧,反正差别也不大。
如果哪位高手找到更好的解决方法,请不吝赐教!
分享到:
相关推荐
Making Java Groovy--Kenneth.A.Kousen. Java Groovy 很不错的学习资料
csdn这样自己涨积分真麻烦,居然要50积分,我自己都下不起了好么,,调整为5个积分 ---------------2020-11-13----------- jdk版本高于9时,groovy无法正常使用,需要将此jar包加入项目中,即可正常打开.
Start building powerful apps that take advantage of the dynamic scripting capabilities of the Groovy language, including what's new in Groovy version 3.0. This book covers Groovy fundamentals, such as...
Groovy jar包 3.0.
groovy1.0-installer.exe groovy1.0-installer.exe groovy1.0-installer.exe
groovy programming(2006.12).pdf
apache-groovy-3.0.8.zip apache官网的groovy3.0.8版本,希望大家多多下载,apache-groovy-3.0.8.zip apache官网的groovy3.0.8版本,希望大家多多下载,apache-groovy-3.0.8.zip apache官网的groovy3.0.8版本,希望...
Groovy and Grails Recipes.pdf ebook
groovy.part2.rar
groovy.part3.rar groovy 1.5
groovy,ApacheGroovy镜像.zip
groovy eclipse plugin 2.9.0 ,groovy eclipse 插件 2.9.0
Groovy in Action, Second Edition is the undisputed definitive reference on the Groovy language. Written by core members of the Groovy language team, this book presents Groovy like no other can—from ...
语言程序设计资料:Groovy_快速入门.doc
最近的groovy-all-2.4.12.jar包供使用,解决as编译时报错问题
标签:groovy、codehaus、jar包、java、中英对照文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结构保持不变,注释和说明精准翻译,请放心...
Groovy.for.Domain.Specific.Languages.pdf
标签:groovy、codehaus、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结构保持不变,注释和说明精准翻译,请放心使用...
Groovy Recipes Greasing the Wheels of Java.pdf