WTK post install / filesystem permissions

Tue, 07. Oct 2008

Categories: en sysadmin Tags: EclipseME J2ME WTK

If running your app from the eclipseme emulator shows the following console output

 1Running with storage root DefaultColorPhone
 2Warning: Failed to initialize WMA message routing support
 3Error: Can't remove a lock file: /opt/sun-j2me-bin-2.2/wtklib/comcon-server.port.lock
 4Warning: Failed to initialize Bluetooth (JSR 82) support
 5...
 6Warning: The attempt to finalize unexisting client.
 7java.lang.NullPointerException
 8at com.sun.kvem.midp.MIDP.run(Unknown Source)
 9at com.sun.kvem.environment.EmulatorInvoker.runEmulatorImpl(Unknown Source)
10at com.sun.kvem.environment.EmulatorInvoker.runEmulatorSameVM(Unknown Source)
11at com.sun.kvem.environment.EmulatorInvoker.runEmulator(Unknown Source)
12at com.sun.kvem.environment.ProfileEnvironment$KVMThread.runEmulator(Unknown Source)
13at com.sun.kvem.environment.ProfileEnvironment$KVMThread.run(Unknown Source)

give write permission to the wtklib folder inside the WTK:

1$ sudo chmod o+w /opt/sun-j2me-bin-2.2/wtklib

The following disease

 1...
 2javax.microedition.rms.RecordStoreException: error opening record store file
 3at javax.microedition.rms.RecordStore.<init>(+428)
 4at javax.microedition.rms.RecordStore.openRecordStore(+109)
 5at name.mro.billard.Stats.findPlayers(+6)
 6at name.mro.billard.Stats.startApp(+4)
 7at javax.microedition.midlet.MIDletProxy.startApp(+7)
 8at com.sun.midp.midlet.Scheduler.schedule(+270)
 9at com.sun.midp.main.Main.runLocalClass(+28)
10at com.sun.midp.main.Main.main(+116)
11startApp threw an Exception
12...

is cured by

1$ sudo chmod o+w -R /opt/sun-j2me-bin-2.2/appdb

A Sun Forum Post provided the correct hint.