0

When I run grails install-dependency, I get this.

java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for
    a different type with name "org/xml/sax/SAXParseException"

What's wrong? I've not used grails dependency management before, and this is rather cryptic.

repositories {        
    grailsPlugins()
    grailsHome()
    mavenLocal()
    mavenCentral()
}

dependencies {
     runtime 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.0'
}
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406

1 Answers1

3

Looks like an xml-apis clash,

Try

dependencies {
     runtime 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.0'{
         excludes 'xml-apis'
     }
}
leebutts
  • 4,882
  • 1
  • 23
  • 25
  • This lets it build, supposedly, but when I try to use HTTPBuilder, I get class not resolved. My IDE also shows that I don't have the appropriate library when I attempt to auto-import or import manually. Thoughts? – Stefan Kendall May 04 '10 at 02:57
  • xalan is another lib that can sometimes cause trouble, does HttpBuilder depend on that? – leebutts May 04 '10 at 03:02
  • HTTPBuilder. It seems like IntelliJ just isn't picking it up, or I don't know what I need to do to make the library visible. I can run with grails run-app, but I'm getting IDE errors. – Stefan Kendall May 04 '10 at 03:03
  • I'm an idiot. I do not need "runtime" as the build specifier. Drr. – Stefan Kendall May 04 '10 at 03:07
  • Related: http://stackoverflow.com/questions/2770819/grails-xom-linkageerror-saxparserexception – Stefan Kendall May 05 '10 at 23:18