Description:
Adding the attachment attribute column to Requirements-list in particular partition causes shows an error 500.
Steps to Reproduce :
- Log in to the application server.
- Go to Requirements.
- Switch partition [--Switch partition--].
- Go to Requirements list.
- Add "attachment" to the list [--Configure--] and click Save and exit.
- Add a document to the selected requirement - (The file is displayed correctly in Requirement list).
- Remove the attachment from the selected requirement.
- Switch partition [--Switch partition--] to another one.
- Add "attachment" to the list [--Configure--] and click Save and exit.
- Some strange format of name in the attachment is displayed - (The file is not attached in the requirement).
- Try to add a document to the requirement - (The file is displayed correctly in Requirement list).
- 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.