powered by Jive Software

createAccount triggers jid-malformed(400) error

Hi everyone I am running into an error when I want to create a registering page for my Android chat aplication. Indeed I am using AccountManager to create a new user like this:

public void CreateUser() {

final ProgressDialog dialog = ProgressDialog.show(this,

“Creating…”, “Please wait…”, false);

Thread t = new Thread(new Runnable() {

@Override

public void run() {

int success;

String pseudoS = pseudo.toString();

String passwordS = password.toString();

String emailS = email.toString();

try {

ConnectionConfiguration connConfig = new ConnectionConfiguration(

HOST, PORT,SERVICE);

XMPPConnection con = new XMPPConnection (connConfig);

try{

con.connect();

}

catch(XMPPException e){

Toast.makeText(SignIn.this, "connexion eror: "+e,3000).show();

}

AccountManager am = new AccountManager(con);

try{

am.createAccount(pseudoS, passwordS);

}

catch(XMPPException e){

Log.d(“request!”, "starting7 "+e);

Toast.makeText(SignIn.this, "Adding account Error: "+e,3000).show();

}

con.disconnect();

} catch (Exception e) {

}

dialog.dismiss();

}

/**

  • After completing background task Dismiss the progress dialog

  • **/

});

t.start();

dialog.show();

}

But when I want to use the creatAccount function I catch the folowing error: jid-malformed(400)

I have no idea what cause this error and the documentation did not help me to find out.

Any ideas?

Thanks all

If I had to guess then a jid-malformed error means that your JID for which you try to create an account is malformed. :smiley:

What’s the String you are using as JID for which you get the jid-malformed error?

Ok Then I am a noob…What is a JID exactly? By the way the database I used is an external one with mySQL. The value I use is: username: toto / password: toto