RMI: Servidor J2SE e Clientes SuperWaba ou J2ME. (Tutorial aqui!)

Ola amigos

eu conseguie rodar direitinho a app servidor porem a app cliente tive algums problemas porem na hora de debugar surgiu esta mensagem…o que e?

Olá. Sei que o post é antigo mas estou necessitando de um apoio.

Implemetei a solução e funcionou perfeitamente para j2se, mas o meu midlet (j2me) não funciona de forma alguma, apresenta o seguinte erro:

arcademis.UnspecifiedException: java.lang.NullPointerException
	at rme.naming.RmeServiceDirectory_Impl_Stub.lookup(Unknown Source)
	at rme.naming.RmeNaming.lookup(Unknown Source)
	at rmi.Movel.<init>(Unknown Source)
	at java.lang.Class.newInstanceImpl(Native Method)
	at java.lang.Class.newInstance(Unknown Source)
	at com.symbian.j2me.midp.runtimeV2.Application.constructAction(Application.java:484)
	at com.symbian.j2me.midp.runtimeV2.Application.startRequest(Application.java:429)
	at com.symbian.j2me.midp.runtimeV2.Application.event(Application.java:298)
	at com.symbian.j2me.midp.runtimeV2.ApplicationEvent.dispatch(ApplicationEvent.java:90)
	at com.symbian.j2me.midp.runtimeV2.ApplicationThread.run(ApplicationThread.java:30)
MIDlet: Movel

A seguir o código do meu midlet.

public class Movel extends MIDlet {

    	private static final String defaultURL = "rmeTeste";

	private Display display = null;

	private SystemInformation ServicoSY  = null;

	private Command exitCmd = null;
	private Command getInf = null;

	private Form sendScr = null;
	private TextField url = null;
	private TextField dados = null;
        
	public Movel() {
		display = Display.getDisplay(this);

		exitCmd = new Command("Exit", Command.EXIT, 1);
		getInf = new Command("getInf", Command.OK, 2);

		try {
			RmeConfigurator mc = new RmeConfigurator();
			mc.configure();

			ServicoSY = (SystemInformation)RmeNaming.lookup(defaultURL);
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
        
	private Screen showSendScreen() {
		if(sendScr == null) {
			sendScr = new Form("Send Message");

			sendScr.addCommand(exitCmd);
			sendScr.addCommand(getInf);
			
//			sendScr.setCommandListener(this);

			url = new TextField("URL: ", defaultURL, 60, TextField.URL);
			sendScr.append(url);

			dados = new TextField("Dados: ", "", 40, TextField.ANY);
			sendScr.append(dados);
		}

		display.setCurrent(sendScr);
		return sendScr;
	}
        
    public void startApp() {
        showSendScreen();
    }
    
    public void pauseApp() {
    }
    
    public void destroyApp(boolean unconditional) {
    }
	public void commandAction(Command c, Displayable s) {
		try {
			if(s == sendScr) {
				if (c == exitCmd) {
					destroyApp(false);
					notifyDestroyed();
				}
				else if (c == getInf) {
                                       RMIClient client = new RMIClient();   
                                       try {   
                                            dados.setString(client.getSystemInfo("127.0.0.1"));
                                        } catch (Exception e) {   
                                            e.printStackTrace();   
                                        }
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

Não sei o que está causando este problema, alguem pode me ajudar.

Obrigada.

Otimo post. :slight_smile:
Obrigado por compartilhar o seu conhecimento com a gente.

O Dinheiro faz homens ricos o conhecimento homens sábios e a humildade faz grandes homens.
Seje Humilde :slight_smile: