Debugging BlackBerry Device Development

Device client and Unwired Server troubleshooting tools for diagnosing RIM® BlackBerry® development problems.

Client-side debugging

Problems on the device client side that may cause client application problems:
  • Unwired Server connection failed.
  • Data does not appear on the client device.
  • Physical device problems, such as low battery or low memory.
To find out more information on the device client side:
  • If you have implemented debugging in your generated or custom code (which Sybase recommends), turn on debugging, and review the debugging information. See Developer Reference for BlackBerry about using the MBOLogger class to add log levels to messages reported to the console.
  • Check the log record on the device. Use the <PkgName>DB.getLogRecords (com.sybase.persistence.Query) or Entity.getLogRecords() methods. Use this method for logs corresponding to MBO classes, except for Other operations, which cannot be retrieved with getLogRecords.

    This is the log format:

    level,code,eisCode,message,component,entityKey,operation,requestId,timestamp

    This is a log sample:

    5,500,'','java.lang.SecurityException:Authorization failed: Domain = default Package = end2end.rdb:1.0 mboName = simpleCustomer action = delete','simpleCustomer','100001','delete','100014','2010-05-11 14:45:59.710'
    • level – the log level currently set. Values include: 1 = TRACE, 2 = DEBUG, 3 = INFO, 4 = WARN, 5 = ERROR, 6 = FATAL, 7 = OFF.
    • code – replication-based synchronization, Unwired Server administration codes:
      • 200 – success.
      • 500 – failure.
    • eisCode – not currently used.
    • message – the message content.
    • component – Mobile Business Object (MBO) name.
    • entityKey – MBO surrogate key, used to identify and track MBO instances and data.
    • operation – operation name.
    • requestId – operation replay request ID or messaging-based synchronization message request ID.
    • timestamp – message logged time, or operation execution time.
  • View the log records on the LogInfo screen, which shows both client and server log information for the application. You can change the client log level in BlackBerry options > Logging.
  • Check the Storm event log:
    1. On the Home screen, press Hold.
    2. Click the upper-left corner and upper-right corner twice.
    3. Review the event log.
  • Check the BlackBerry event log:
    1. On the device, press ALT+lglg.
    2. Review the event log, and see the RIM BlackBerry documentation for information about debugging and optimizing.http://na.blackberry.com/eng/developers/resources/A50_How_to_Debug_and_Optimize_V2.pdf

Server-side debugging

Problems on the Unwired Server side that may cause device client problems:
  • The domain or package does not exist.
  • Authentication failed for the synchronizing user.
  • The operation role check failed for the synchronizing user.
  • Back-end authentication failed.
  • An operation failed on the remote, replication database back end, for example, a table or foreign key does not exist. Detailed messages can be found in the Log Record.
  • An operation failed on the Web service, REST, or SAP® back end. You can find detailed messages in the log record.
To find out more information on the Unwired Server side:
  • Check the MMS server log files. See the Sybase Control Center documentation for more information.