Adding the attachment attribute to Requirements-list in particular partition causes Error 500.

Document ID : KB000051677
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Adding the attachment attribute column to Requirements-list in particular partition causes shows an error 500.

Steps to Reproduce :

  1. Log in to the application server.

  2. Go to Requirements.

  3. Switch partition [--Switch partition--].

  4. Go to Requirements list.

  5. Add "attachment" to the list [--Configure--] and click Save and exit.

  6. Add a document to the selected requirement - (The file is displayed correctly in Requirement list).

  7. Remove the attachment from the selected requirement.

  8. Switch partition [--Switch partition--] to another one.

  9. Add "attachment" to the list [--Configure--] and click Save and exit.

  10. Some strange format of name in the attachment is displayed - (The file is not attached in the requirement).

  11. Try to add a document to the requirement - (The file is displayed correctly in Requirement list).

  12. The Requirements-list display error.

Expected: Attachment is created successfully

Acutal: Error 500 - Internal Server Error. The server could not retrieve the document due to server-configuration or other technical problems. Contact your site administrator.

  • The same scenario is working for some partitions and for others not.

    Error in app-niku.log (1):

    Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
    at org.apache.xerces.dom.CoreDocumentImpl.createAttribute(Unknown Source)
    at org.apache.xerces.dom.ElementImpl.setAttribute(Unknown Source)

  • The same root cause of the defect affects when adding an attachment if the "attachment" attribute it's a custom one (type: attachment).

    Error in app-niku.log (2):

    ERROR 2010-02-26 14:10:29,177 [http-80-Processor9] object.ODFAbstractObjectImpl (tfonseca:5012045__-21ed151d:rqrmnt.requirementPropertiesSubmit) Unable to create attribute attachment folder
    java.lang.ArrayIndexOutOfBoundsException: 0
    at com.niku.odf.object.ODFAbstractObjectImpl.getFolderId(ODFAbstractObjectImpl.java:3102)
    at com.niku.odf.object.ODFAbstractObjectImpl.processNewAttachment(ODFAbstractObjectImpl.java:2810)
    at com.niku.odf.object.ODFAbstractObjectImpl.processAttachments(ODFAbstractObjectImpl.java:2622)
    at com.niku.odf.object.ODFObjectImpl.update(ODFObjectImpl.java:2346)
    at com.niku.odf.object.ODFObjectImpl.update(ODFObjectImpl.java:2217)
    at com.niku.odf.service.ODFUpdateServiceBinding.process(ODFUpdateServiceBinding.java:78)
    at com.niku.odf.service.ODFService.doProcess(ODFService.java:183)
    at com.niku.odf.service.BaseODFService.processRequest(BaseODFService.java:109)

    Problem comes from transformer.java:

    Map.Entry[] entries = (Map.Entry[]) valueQualifiersMap.entrySet().toArray( Utils.EMPTY_MAP_ENTRY_ARRAY );
    for( int i = 0; i < entries.length; i++ )
    {
    e.setAttribute( (String) entries[i].getKey(), entries[i].getValue().toString() );
    }
    entries[i].getKey() is coming as numeric value

Solution:

Status/Resolution:

This issue has been documented as CLRT-52014 and is assigned to development for review.

Keywords: CLARITYKB, CLRT-52014, clarity12open.