0 Replies Latest reply: Jan 31, 2011 2:21 AM by U.Aravind RSS

    Error While Calling  Connector.open(url)  method

    U.Aravind
      Hello,
      I have problem running my MIDlet. The thing is, my MIDlet runs perfectly, when i run it by using localhost as IP Address in Connector.open(url) method. But when i run the same MIDlet by using public IPin the URL, i get a runtime Exception. I've given the error message below. Can anyone help me overcome this Error? Thanks.....

      java.lang.IllegalArgumentException: invalid host format
      at com.sun.midp.io.HttpUrl.parseAfterScheme(), bci=612
      at com.sun.midp.io.HttpUrl.<init>(), bci=33
      at com.sun.midp.io.j2me.http.Protocol.openPrim(), bci=15
      at javax.microedition.io.Connector.openPrim(), bci=327
      at javax.microedition.io.Connector.open(), bci=3
      at javax.microedition.io.Connector.open(), bci=3
      at javax.microedition.io.Connector.open(), bci=2
      at hello.leave.invokeServlet(leave.java:1455)
      at hello.leave.commandAction(leave.java:298)
      at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46
      at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74
      at com.sun.midp.chameleon.layers.SoftButtonLayer.commandSelected(), bci=11
      at com.sun.midp.chameleon.layers.MenuLayer.pointerInput(), bci=170
      at com.sun.midp.chameleon.CWindow.pointerInput(), bci=76
      at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handlePointerEvent(), bci=19
      at com.sun.midp.lcdui.DisplayEventListener.process(), bci=296
      at com.sun.midp.events.EventQueue.run(), bci=179
      at java.lang.Thread.run(Thread.java:662)