Skip to main content

com/mashape/unirest/http/ObjectMapper error

  • February 8, 2019
  • 2 replies
  • 14 views

I am using Airtable in a Java project with Eclipse, but i have this problem:

-Code :
import java.lang.reflect.InvocationTargetException;

import com.sybit.airtable.Airtable;
import com.sybit.airtable.Base;
import com.sybit.airtable.Table;
import com.sybit.airtable.exception.AirtableException;
import java.lang.reflect.InvocationTargetException;

public class Main {

@SuppressWarnings("unchecked")
public void UpdatePelicula() throws AirtableException, IllegalAccessException, InvocationTargetException, NoSuchMethodException{
	
	Airtable airtable = new Airtable().configure();
	
	System.out.println("Hola");
	
	Base base = airtable.base("keyA50PJucw4m5Ktc");
	
	Table <Peliculas> peliculasTable = base.table("Peliculas", Peliculas.class);
	
	
	
}

public static void main(String[] args) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException, AirtableException{
	
	Main main = new Main();
	main.UpdatePelicula();
}

}

  • Error:

Exception in thread “main” java.lang.NoClassDefFoundError: com/mashape/unirest/http/ObjectMapper
at Main.UpdatePelicula(Main.java:15)
at Main.main(Main.java:32)
Caused by: java.lang.ClassNotFoundException: com.mashape.unirest.http.ObjectMapper
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)
… 2 more

2 replies

Forum|alt.badge.img+3
  • Participating Frequently
  • 586 replies
  • February 9, 2019

Its seems to be a runtime error…
Based on the error message, I understand that you will need to add the Unirest library to your CLASSPATH to resolve the error.


  • Author
  • New Participant
  • 1 reply
  • February 9, 2019

Where can I find the Unirest Library?

Also, I have problems with the airtable-java.pom file in eclipse, and i dont know how to fix it.

Thanks for your reply :slightly_smiling_face: