Well, how do you mean to connect to server if it doesnt' work
this
must be a valid address that works. If you have some local application on 8080 port with loginServlet mapping, than make it work.
Error you are receiving is probably produces by unreachable server. Application tries to connect but it doesn't have valid working address.
You could try using .netbeans with integrated wtk (or better newest version with integrated Java ME SDK 3.0.)
Than you can use debugger (and try/catch blocks or some logger) to find exact spot where error occurred.
To connect over lan you also need to have working server on one machine
and from application point to that machine with it's IP address. Port would be needed too.
(you need to have static ip addresses on both machines)