Grails install error "java.lang.TypeNotPresentException: Type org.apache.http.client.methods.HttpRequestBase not present" -
i getting typenotpresentexception in grails application. stacktrace snippet below
[info] [groovyc] java.lang.typenotpresentexception: type org.apache.http.client.methods.httprequestbase not present [info] [groovyc] @ sun.reflect.generics.factory.corereflectionfactory.makenamedtype(corereflectionfactory.java:98) [info] [groovyc] @ sun.reflect.generics.visitor.reifier.visitclasstypesignature(reifier.java:107) [info] [groovyc] @ sun.reflect.generics.tree.classtypesignature.accept(classtypesignature.java:31) [info] [groovyc] @ sun.reflect.generics.reflectiveobjects.wildcardtypeimpl.getupperbounds(wildcardtypeimpl.java:112) [info] [groovyc] @ org.codehaus.groovy.vmplugin.v5.java5.configurewildcardtype(java5.java:122) [info] [groovyc] @ org.codehaus.groovy.vmplugin.v5.java5.configuretype(java5.java:85) [info] [groovyc] @ org.codehaus.groovy.vmplugin.v5.java5.configuretypearguments(java5.java:154) [info] [groovyc] @ org.codehaus.groovy.vmplugin.v5.java5.configureparameterizedtype(java5.java:134) [info] [groovyc] @ org.codehaus.groovy.vmplugin.v5.java5.configuretype(java5.java:87) [info] [groovyc] @ org.codehaus.groovy.vmplugin.v5.java5.makeclassnode(java5.java:374) [info] [groovyc] @ org.codehaus.groovy.vmplugin.v5.java5.configureclassnode(java5.java:315) [info] [groovyc] @ org.codehaus.groovy.ast.classnode.lazyclassinit(classnode.java:263) [info] [groovyc] @ org.codehaus.groovy.ast.classnode.getinterfaces(classnode.java:341) [info] [groovyc] @ org.codehaus.groovy.ast.classnode.declaresinterface(classnode.java:929) [info] [groovyc] @ org.codehaus.groovy.ast.classnode.implementsinterface(classnode.java:909) [info] [groovyc] @ org.codehaus.groovy.ast.classnode.isderivedfromgroovyobject(classnode.java:899) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.isgroovyobject(asmclassgenerator.java:2741) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.visitpropertyexpression(asmclassgenerator.java:2717) [info] [groovyc] @ org.codehaus.groovy.ast.expr.propertyexpression.visit(propertyexpression.java:55) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.visitandautoboxboolean(asmclassgenerator.java:4111) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.makecallsite(asmclassgenerator.java:2171) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.makecall(asmclassgenerator.java:2008) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.makecall(asmclassgenerator.java:1994) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.visitstaticmethodcallexpression(asmclassgenerator.java:2404) [info] [groovyc] @ org.codehaus.groovy.ast.expr.staticmethodcallexpression.visit(staticmethodcallexpression.java:43) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.visitandautoboxboolean(asmclassgenerator.java:4111) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.evaluateexpression(asmclassgenerator.java:1437) [info] [groovyc] @ org.codehaus.groovy.classgen.asmclassgenerator.visitreturnstatement(asmclassgenerator.java:1398) [info] [groovyc] @ org.codehaus.groovy.ast.stmt.returnstatement.visit(returnstatement.java:47) [info] [groovyc] @ org.codehaus.groovy.ast.codevisitorsupport.visitblockstatement(codevisitorsupport.java:35)
my buildconfig.groovy file has following code
dependencies { // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg. // compile('com.cm:admanager:1.4.8') { // transitive = false // } compile('org.codehaus.groovy.modules.http-builder:http-builder:0.5.0') { excludes 'httpclient', 'groovy', 'nekohtml', 'ezmorph', 'commons-logging' } compile('org.apache.httpcomponents:httpclient:4.0.1') { excludes 'commons-logging' } compile('org.perf4j:perf4j:0.9.16') compile('com.thoughtworks.xstream:xstream:1.4.4') compile('com.google.guava:guava:16.0.1') test('org.hamcrest:hamcrest-all:1.3') }
.sh file being used run project
rm -rf "$home/.ivy2/cache/com.cm/nci-autodata" rm -rf "$home/.m2/repository/com/cm/nci-autodata" mvn -f build.xml -pdev -x clean install
httpclient-4.0.1 supposed have required class still gives me exception. checked .ivy2 folder , has required jar file in correct place. idea what's going on here?
this project given @ new job. have not written code , person did has left company.
thanks
i resolved it. had delete .grails , .ivy2 folder , recompile again. downloaded correct dependencies , worked. lot guys
Comments
Post a Comment