Restarting Loop | Thales IoT Developer Community
December 4, 2014 - 6:02pm, 4566 views
Hi,
I have appended to my .jad file the following to make it automatically start
Oracle-MIDlet-Autostart: 1
Oracle-MIDlet-Restart: true
Oracle-MIDlet-Restart-Count: 5
However this has had some pretty bad side-effects. There seems to be an error in my MIDlet. And it is going through a restart loop, which I am unsure how to stop. The error messages in the output are as follows :
"MIDlet:com.me.demo.Application autostart
java.lang.NoClassDefFoundError: com/cinterion/io/ATCommandFailedException
- java.lang.Class.invoke_verify(), bci=0
- java.lang.Class.initialize(), bci=100
- java.lang.Class.forName(), bci=0
- com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=1
- com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=63
- com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=24
- 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
MIDlet:com.me.demo.Application abnormal exit
MIDlet:com.me.demo.Application restart
MIDlet:com.me.demo.Application abnormal exit
java.lang.NoClassDefFoundError: com/cinterion/io/ATCommandFailedException
- java.lang.Class.invoke_verify(), bci=0
- java.lang.Class.initialize(), bci=100
- java.lang.Class.forName(), bci=0
- com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=1
- com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=63
- com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=24
- 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
MIDlet:com.me.demo.Application restart again
MIDlet:com.me.demo.Application abnormal exit"
Then eventually after looping this alot of ***** it displays, where it reboots
"MIDlet:com.me.demo.Application restart limit reached -> reboot
^SYSLOADING
SYSTEM.OUT STARTED"
I was wondering if there was a way to remove the autostart on this so I can remove it. So far I have tried to access the USB but there is no response, and on the output ASC0 I cannot seem to enter anthing in fast enough to be able to stop it from rebooting.
Hello,
Please prepare the command: at^scfg="Userware/Autostart","","0" and paste it in the terminal.
You should be able to do it. Just don't use the same interface where the System.out is directed. USB interfaces should be disconnected when you turn on or reboot the module. So switch off the module, disconnect USB, switch it on, connect terminal and paste command.
After that you will be able to uninstall the MIDlet. Just remember to activate the autostart after that. It must be activated because the Cinterion JRC MIDlet will not start.
Please also consider other setting in your application's jad file in the development phase.
Or you can change the autostart delay - but this will also affect the JRC MIDlet.
The exception is thrown probably because you have not exported cwmlib library - you need to do that if you want to use AT commands.
Open project properties, go to Order and Export tab and check the cwmlib.
Best regards,
Bartłomiej