views:

109

answers:

1

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'
}
+3  A: 

Looks like an xml-apis clash,

Try

dependencies {
     runtime 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.0'{
         excludes 'xml-apis'
     }
}
leebutts
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
Which class can't it find?
leebutts
xalan is another lib that can sometimes cause trouble, does HttpBuilder depend on that?
leebutts
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
I'm an idiot. I do not need "runtime" as the build specifier. Drr.
Stefan Kendall
Related: http://stackoverflow.com/questions/2770819/grails-xom-linkageerror-saxparserexception
Stefan Kendall