java - CouchDB4j/ mvn dependencies are missing -
i having trouble setting connection local couchdb programmatically.
i using couchdb4j- , things seem good, until run , try connect db.
my console throwing following error:
exception in thread "awt-eventqueue-0" java.lang.noclassdeffounderror: org/apache/http/params/httpparams [...] caused by: java.lang.classnotfoundexception: org.apache.http.params.httpparams
since small application not finding class, i've checked dependencies- should fine. have:
<dependency> <groupid>org.apache.httpcomponents</groupid> <artifactid>httpcore</artifactid> <version>4.0-beta3</version> </dependency> <dependency> <groupid>commons-httpclient</groupid> <artifactid>commons-httpclient</artifactid> <version>3.1</version> </dependency>
which should include necessary http specific .jar (especially first 1 should include httpparams binaries; source: http://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/4.0-beta3 ).
to prevent including wrong binaries cached on system, running following:
mvn clean && mvn package
i've deleted .m2 folder.
googling around gave me hint classpath may wrong leading missing dependencies in runtime. have set classpath in pom; see here:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-jar-plugin</artifactid> <version>2.4</version> <configuration> <archive> <manifest> <addclasspath>true</addclasspath> <classpathprefix>lib/</classpathprefix> <mainclass>packagename.main</mainclass> </manifest> </archive> </configuration> </plugin>
hopefully can give me 1 idea can fix issue :)
best regards.
add these dependencies inside plugin declaration this:
<plugin> <groupid>...</groupid> <artifactid>...</artifactid> <version>...</version> <dependencies> ... </dependencies> </plugin>
plugins have own classpath
Comments
Post a Comment