Help

com/mashape/unirest/http/ObjectMapper error

Topic Labels: API
1985 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Sergio_Garcia_A
4 - Data Explorer
4 - Data Explorer

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 2
Andrew_Johnson1
8 - Airtable Astronomer
8 - Airtable Astronomer

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.

Sergio_Garcia_A
4 - Data Explorer
4 - Data Explorer

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: