Skip to Content
Mobile

How to setup JCO tracing in SUP 2.x

Tags:

How to setup JCO tracing in SUP 2.x

Purpose

This technical document explains how to setup JCO tracing in SUP.
JCO is the driver used to connect to SAP back end Data Servers.
We will explore the two available configuration options available.

DESCRIPTION

JCO is used to connect to SAP Back Servers.

  • SAP Mobile WorkSpace (design-time) – SAP® Java Connector   3.0.7
  • SAP Mobile Server (runtime) – SAP Java Connector 3.0.9

 

Required Software

  1. SUP 2.x.x or higher.
  2. JCO connection to a SAP Backend
  3. Read Write Permissions.

Assumption

  • This document assumes you have a working SUP environment.
  • You have a SAP Backend 
  • Have Administrator rights to the Operating System and Sybase Unwired Server.
  • You have configured a JCO connection thru SCC to connect to SAP.

    Issue1:
  • Connection errors.
  • Wrong result set.
  • ABAPI errors.
  • Time out errors
  • Incorrect results set.

Solution

First is to add the JCO tracing in the users option in Sybase Control Center.
You will need to perform the following steps.

Step 1: Turn on JCO tracing in the SAP Mobile Server system properties:

  1. In SAP Control Center for SAP Mobile Platform, select Performance
    Configuration > User Options for your SAP Mobile Server.
  2. You need to configure JVM parameters in the form -Dxxx=xxx.
    Add the following JVM parameters: -Djco.trace_level=10.
  3. The meaning of jco.trace_level is to determine the level of detail of
    tracing you get from the JCo libraries. The value options are 1 the 10.
  4. Add -Djco.trace_path=C:\temp The jco.trace_path determines a directory
    where trace files get stored.
  5. Save and restart the SUP server so the changes to take affect.
            

Figure1 Note you will need to save the change and you will need to restart the SUP server.

Step 2: Collecting JCO tracing information.

Once you have configured the JCO trace level and the location for the trace file.
You can do a simple test connect via the SCC to confirm the tracing is working.


Figure2 Perform a Test Connection and then check the Temp directory for the trace file.


Figure3 The above trace out put is an an exaple of a test connect.

An alternative method of adding JCO tracing.

Some versions of SUP may not allow the –D option to be set in the JVM line.
To work around the issue you can add the –D values directly to the
mlsrv.ext.ini file.

1.    Shut down the SUP server.

2.    Back up the mlsrv.ext.ini file

3.    Edit the mlsrv.ext.ini with notepad++

4.    Go to the line that starts with java (-jrepath"C:\SAP\MobilePlatform\JDK1.6.0_31-x64\jre"

5.    At the end of the line add -Djco.trace_level=10 -Djco.trace_path=c:\temp


Your line should look exactly like this


Figure4

6.    Save the mlsrv.ext.ini

7.    Restart the SUP serve

8.    Tests connect and you should now have the trace file in the temp directory.

Summary

This document explained in details two alternatives on how to setup JCO tracing in SUP. As you can see the
steps are very easy and can offer details of the activity going back and forth from the SUP server and SAP Data tier.
This is indeed is a simple way of trouble shooting issue and can help you quickly identify root cause.