Gemalto is now part of the Thales Group, find out more.

You are here

NetDemo sample application throws execption | Thales IoT Developer Community

January 8, 2015 - 11:29am, 5282 views

When I launch the NetDemo sample from eclipse I receive an exception when the socket is closed on the server side. I would expect that is.read() returns -1. The module is a BGS5T.

Using USB port COM7.

Connecting to module...

Initializing module for debugging...

Establishing "IP connection for remote debugging of BGSx"...

Registering ip address "192.168.244.1" of remote debugging device...

Waiting for debug device registration of "IMP_NG_BGS5_REMOTE"...

Passing control to external device emulator...

Installing suite from: http://192.168.244.2:50571/NetDemo.jad

NetDemo: Constructor

NetDemo: startApp

NetDemo: Connector open: socket://v.x.y.z:80;bearer_type=GPRS;access_point=internet;username=anyone;password=something
NetDemo: sending: GET /somefile.txt HTTP/1.0
NetDemo: Unknown error -123 during socket::read
NetDemo: destroyApp(true)
MIDlet:NetDemo.NetDemo exited

End of debug session. Emulator is closed!

Stacktrace:

java.io.IOException: Unknown error -123 during socket::read
 - com.sun.midp.io.j2me.socket.Protocol.read0(), bci=0
- com.sun.midp.io.j2me.socket.Protocol.nonBufferedRead(), bci=10
- com.sun.midp.io.BufferedConnectionAdapter.readBytes(), bci=30
- com.sun.midp.io.BaseInputStream.read(), bci=197
- com.sun.midp.io.BufferedInputStream.fill(), bci=120
- com.sun.midp.io.BufferedInputStream.read(), bci=12
- NetDemo.NetDemo.startApp(NetDemo.java:107)
- javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
- com.sun.midp.midlet.MIDletPeer.startApp(), bci=5
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=261
- com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
- com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
- com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=134
- com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26

This is reproducible on another BGS5T unit and without the debugger.