Error
Warning: To avoid potential deadlock, operations that may block, such asnetworking, should be performed in a different thread than thecommandAction() handler.
Introduction
This is a common error which we encounter in J2ME applications while using Networking functions such as "HttpConnection". The function which calls buit in function "HttpConnection" should be called as a seperat thread reather then calling directly from commandAction()
Solutions
call the function in a new thread like give below;
Thread t = new Thread() { public void run() { <function-to-be-called> } }; t.start();
Example
Thread t = new Thread() { public void run() { myfunction(); } }; t.start();