Fwd: exec:java don't find existing class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: exec:java don't find existing class

Raivo Rebane
Hello

I run following command:

mvn exec:java -Dexec.mainClass="SolrJExample" -X

and get following error :

java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient

I use projct repo and dependencies is:

         <dependency>
           <groupId>lib</groupId>
           <artifactId>httpclient</artifactId>
           <version>1.0</version>
         </dependency>

         <dependency>
           <groupId>lib</groupId>
           <artifactId>solrj</artifactId>
           <version>1.0</version>
         </dependency>

         <dependency>
           <groupId>lib</groupId>
           <artifactId>httpcore</artifactId>
           <version>1.0</version>
         </dependency>

         <dependency>
           <groupId>lib</groupId>
           <artifactId>codec</artifactId>
           <version>1.0</version>
         </dependency>

         <dependency>
           <groupId>lib</groupId>
           <artifactId>logging</artifactId>
           <version>1.0</version>
         </dependency>

Command seems uses them:

[DEBUG] Adding project dependency artifact: solrj to classpath
[DEBUG] Adding project dependency artifact: httpclient to classpath
[DEBUG] Adding project dependency artifact: httpcore to classpath
[DEBUG] Adding project dependency artifact: codec to classpath
[DEBUG] Adding project dependency artifact: logging to classpath

httpclient contains jar what contains following classes screenshot attached

Why java don't find them ?

Regars

Raivo







---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]