wood burning stoves 2.0*
The moose likes Threads and Synchronization and the fly likes Warning: To avoid potential deadlock networking, should be performed in a diff.thread. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Warning: To avoid potential deadlock networking, should be performed in a diff.thread." Watch "Warning: To avoid potential deadlock networking, should be performed in a diff.thread." New topic
Author

Warning: To avoid potential deadlock networking, should be performed in a diff.thread.

vibhor Bhat
Greenhorn

Joined: Jan 15, 2009
Posts: 2
hi,
i am trying to do networking with the help of HttpConnection class but always get this warning either i use thread or not..


Warning: To avoid potential deadlock, operations that may block, such as
networking, should be performed in a different thread than the
commandAction() handler.

and after this the MIDP application is not working.

this is my code & it is a code for a mobile application.
anybody can please update this code because i am trying to call in a different thread but its not working.





[HENRY: Added Code Tags]
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18545
    
  40

anybody can please update this code because i am trying to call in a different thread but its not working.


How are you "trying to call in a different thread"? I don't see any threading code here.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Chanakya Gupta
Ranch Hand

Joined: May 23, 2010
Posts: 34

Hi Vibhor

Sorry for picking up an old thread !
But we are getting the same error
while running a MIDlet.

SCJP6, SCWCD5, SCMAD
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Warning: To avoid potential deadlock networking, should be performed in a diff.thread.
 
Similar Threads
How to invoke the MIDlet ?
GPRS + J2ME Related queires
checking for internet connectivity
J2ME, servlet and database help..
Network error in first Servletjava.lang.NullPointerException in java wireless toolkit