The OSLC CM REST API truncates multiline fields

Technote (troubleshooting)


Problem(Abstract)

When you use the OSLC CM REST API in IBM Rational ClearQuest, multiline fields in the REST client are truncated for default installations whenever multiline fields are greater than 2000 characters.

Cause

The maximum multiline field length is an adjustable value in OSLC and by default it allows 2000 characters.
If you leave this default value as-is, multiline fields that are greater than 2000 characters are truncated.


Resolving the problem

To resolve the issue:

  1. Open the following directory on the CM server:


    For
    ClearQuest 8.0.0.x and 8.0.x:

    <CQWebProfile>\installedApps\dfltCell\TeamEAR.ear\cqweb.war\WEB-INF\classes


    The <CQWebProfile> is the location of the WebSphere profile hosting the CQ Web application.
    For example, for a 32-bit machine, the ClearQuest installer creates the WebSphere profile here:
    C:\Program Files\IBM\RationalSDLC\ClearQuest\cqweb\cqwebprofile

    For ClearQuest 7.1.x on 32 bit Windows:

    C:\Program Files\IBM\RationalSDLC\common\CM\profiles\cmprofile\installedApps\
    dfltCell\TeamEAR.ear\cqweb.war\WEB-INF\classes


    For ClearQuest 7.1.x on 64 bit Windows:

    C:\Program Files (x86)\IBM\RationalSDLC\common\CM\profiles\cmprofile\installedApps\
    dfltCell\TeamEAR.ear\cqweb.war\WEB-INF\classes


  2. Open the file cqrest.properties. The file should contain text similar to following. The max.multiline.text.length is the one we will be editing.


    com.ibm.rational.cm.web.component.oauth.accessor.limit=1000
    com.ibm.rational.cm.web.component.oslc.forward.certificate=true
    com.ibm.rational.cm.web.component.ltpa.cookie.name=LtpaToken2
    com.ibm.rational.cm.web.component.restrict.oslcenabled.types=false
    com.ibm.rational.cm.web.component.oslc.configuration.autoInitializeRepository=false
    com.ibm.rational.cm.web.component.cm.server.ssl.enabled=false
    com.ibm.rational.cm.web.component.cm.server.name=localhost
    com.ibm.rational.cm.web.component.oslc.forward.securityToken=true
    com.ibm.rational.cm.web.component.cm.server.port=12080
    com.ibm.rational.cm.web.component.restrict.rcr.types=false
    com.ibm.rational.cm.web.component.max.multiline.text.length=2000
    com.ibm.rational.cm.web.component.oslc.change.check=false
    com.ibm.rational.cm.web.component.oslc.configuration.location=file
    com.ibm.rational.cm.web.component.cm.server.connect=direct
    com.ibm.rational.cm.web.component.oauth.deprecated.warnings=true
    com.ibm.rational.cm.web.component.oslc.v1.compatibility.mode=false


  3. Change the line as follows.

    BEFORE

    com.ibm.rational.cm.web.component.max.multiline.text.length=2000


    AFTER

    com.ibm.rational.cm.web.component.max.multiline.text.length=5000


    OR

    com.ibm.rational.cm.web.component.max.multiline.text.length=0


  4. Restart the CM server.


Notes:

  • This value determines the size of an internal buffer to store the multiline text data. If the actual data is smaller than this, then the buffer wastes space. If the actual data is larger than this then it is truncated.
  • You can change the parameter to any length that suits the size of your multiline field data.
  • You can use 0 if you don't want your data be truncated but don't know the maximum length of your multiline fields. The query will fetch the entire multiline text field and the buffers will not have any wasted space. Be careful about using 0:
    1. From a memory point of view, 0 is more efficient in that it only allocates as much memory as it needs. Ultimately, however, using 0 may cause ClearQuest to consume more memory than if you set a fixed value, because the latter will truncate the multiline text data if it is larger than the maximum multiline size.
    2. From a performance point of view, setting it to 0 will cause queries with multiline text columns to run slower. Per internal tests with a query that had one multiline text field, there was 10% increase in time to run a query with 100 rows in the result set, a 15% increase in time to run a query with 1000 rows in the result set, and a 25% increase in time to run a query with 8000 rows in the result set.
  • Using either 0 or a very large value for this limit may cause ClearQuest to run out of memory. A very large value for this limit will cause out of memory if there are enough rows returned in the result. This is because a buffer of this size is allocated for each multiline text value, even if the actual value is empty. Using 0 for this limit could cause ClearQuest to run out of memory if the total amount of multiline text data for all columns and rows in the result-set is too large to hold in memory, For example, fields such as the Note_Log field in out-of-the-box schemas may contain huge amounts of data. If the result set included the Notes_Log for many defects, it may cause ClearQuest to run out of memory condition.

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational ClearQuest
CM Server

Software version:

7.1, 7.1.0.1, 7.1.0.2, 7.1.1, 7.1.1.1, 7.1.1.2, 7.1.1.3, 7.1.1.4, 7.1.1.5, 7.1.1.6, 7.1.1.7, 7.1.1.8, 7.1.1.9, 7.1.2, 7.1.2.1, 7.1.2.2, 7.1.2.3, 7.1.2.4, 7.1.2.5, 7.1.2.6, 7.1.2.7, 7.1.2.8, 7.1.2.9, 7.1.2.10, 7.1.2.11, 7.1.2.12, 8.0, 8.0.0.1, 8.0.0.2, 8.0.0.3, 8.0.0.4, 8.0.0.5, 8.0.0.6, 8.0.0.7, 8.0.0.8, 8.0.1, 8.0.1.1

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Reference #:

1590934

Modified date:

2014-08-20

Translate my page

Machine Translation

Content navigation