I began to use CloudBoost yesterday. In order to learn how to use it, i decide to save a sample Cloud object like this :
try{
final CloudObject obj = new CloudObject("Truc");
obj.set("col",2);
new Thread(new Runnable()
{
@Override
public void run()
{
try{
obj.save(new CloudObjectCallback()
{
@Override
public void done(CloudObject x, CloudException t) throws CloudException
{
if (x != null){
System.out.println("x != null");
}
else {
System.out.println("x == null");
}
if (t == null)
{
System.out.println("<<OK>>");
}
else{
System.out.println("t != null");
t.printStackTrace();
}
}
});
}catch (CloudException e){
System.out.println("inner CloudException thrown");
e.printStackTrace();
}
}
}).start();
}catch (CloudException e){
System.out.println("outter CloudException thrown");
e.printStackTrace();
}
But this code thrown me a CloudException : Bad Request. Why and how fix this problem?
Greetings.
This issues is caused by a wrong
app_id
andclient_key
combination, wrong datatype in table column, or even an in existentCloudTable
you are trying to save to.