java.lang.NoClassDefFoundError: org/apache/http/conn/ClientConnectionManager

Hello,

Unfortunately I have a small amount of knowledge about Maven and Java and am trying to run the Create your first with project with the Engine APIs and Maven and am running into a problem. I am trying to run the rest api example and am getting the following errors. Ive added some of the relevant POM file entries. What am I doing wrong?

Thanks

<groupId>org.bonitasoft.example</groupId>
    	<artifactId>rest-api-example</artifactId>
    	<version>1.0.0-SNAPSHOT</version>
    	<properties>
    		<bonita.bpm.version>7.0.0</bonita.bpm.version>
    	</properties>
    	<dependencies>
    		<!-- required to programmatic create a process to install -->
    		<dependency>
    			<groupId>org.bonitasoft.engine</groupId>
    			<artifactId>bonita-client</artifactId>
    			<version>${bonita.bpm.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.apache.httpcomponents</groupId>
    			<artifactId>httpclient</artifactId>
    			<version>4.3.4</version>
    		</dependency>

C:\development\bonita-examples-master\rest-api-example>java -jar ./target/rest-api-example-1.0.0-SNAPSHOT.jar Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/conn/ClientConnectionManager at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.privateGetMethodRecursive(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod(Unknown Source) at sun.launcher.LauncherHelper.validateMainClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.ClientConnectionManager at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 7 more

1 Like