[Grails] 解决问题记录:安装运行grails 1.3.7提示UNRESOLVED DEPENDENCIES及loader constraint violation的解决

onc4hy 2011-10-30
很奇怪,grails1.3.7以前在我的xp电脑上一直运行不起来,但是2.0.0m2就没有问题,
后来决定再次测试安装1.3.7,一定要解决这个问题,
设置对应的GRAILS_HOME变量,运行后,又出现错误提示
:: problems summary ::
:::: WARNINGS
  module not found: commons-digester#commons-digester;1.6
下载上述版本的jar包然后放置到grails目录下的lib包(注:grails寻找的jar包路径是lib/dist/plugins).
运行,再次提示缺少下述包
::::::::::::::::::::::::::::::::::::::::::::::
::          UNRESOLVED DEPENDENCIES         ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.jboss.netty#netty;3.1.5.GA: not found
:: junit#junit;3.8.1: not found
:: xml-apis#xml-apis;1.3.04: not found
::::::::::::::::::::::::::::::::::::::::::::::
重复上述过程.
之后再运行 grails help 就没有错误提示了.
但是,在执行 grails create-app 时又有错误提示:
Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"

感谢http://forum.springsource.org/showthread.php?107617-Grails-1.3.7-bug&p=357307这个帖子,其中一个回帖:
sjbwylbs 

I have not CLASSPATH in my WIN7 OS.
and didn't added any JARS to my JRE or JDK installtions.

and i have do by your tips,move the ~/.ivy2 cache directory to some other temporary location and try again,but it still got that stacks.

我删除了用户目录下的/.ivy2目录和/.grails目录
再重新尝试就可以了.
kidli 2011-10-31
删.grails不是必须的,但是如果要同时使用多个grails版本,清理.ivy2是必须的
copoplar 2011-12-05
grails clean 一下不就行了?
Global site tag (gtag.js) - Google Analytics