"java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpRequestBase" error

0 votes

When I tried to create a User, got this error:

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpRequestBase
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:120)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpRequestBase
at com.shephertz.app42.paas.sdk.java.user.UserService.createUser(UserService.java:101)
at com.petfight.PetFight.create(PetFight.java:36)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.methods.HttpRequestBase
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

Am I missing a Library? I solved a similar problem adding json.jar to my classpath.
asked Sep 26, 2014 in AppWarp by angel.aranguiz (15 points)

1 Answer

0 votes
 
Best answer

Hello Angel,

 

App42 jar has dependency on some external jars like commons-logging-1.1.1,commons-logging-api-1.1.1httpclient-4.1httpcore-4.1json-orgThese jars are available under lib folder of downloaded JAVA SDK zip. Please add all these  jar files in your project reference. It will resolve this issue.

Let us know if it helps.

Thanks,

Himanshu Sharma

 

answered Sep 26, 2014 by hs00105 (2,005 points)
selected Sep 26, 2014 by angel.aranguiz
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...