Clarity: Locked Document Attribute causes incident not to save properly.

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

Description:

Details:

If you run a process that locks the document attribute against an incident that has no document attached to that field and then try to save a change to that incident, it will error out with the following error:

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

Note:

  1. If the incident has a document attached to the document field, the incident will save with no problem.

  2. This also happens for issues and subobjects on the project object. So, this probably happens for any object/sub-object that has this kind of document field.

Steps to Reproduce:

  1. Create an incident process p1

    1. Go to Admin tools -Data Administration - Processes

    2. Click the New button and enter requested information (Process Name = p1 and Process ID = p1)

    3. Go to Process Definition: Objects and assign the incident object

    4. Go to Process Definition: Steps and create step with system action (lock Selected Attributes = document)

    5. Link the steps Start Step Finish in post condition of all steps

    6. Go to Process Validation and Validate All and Activate

  2. Create an incident and run the process p1

    1. Go to Home - Demand Management Incident

    2. Create a new incident and click Save button

    3. Go to Processes Available and kick off the process p1

    4. Wait until the process is finished

  3. Update the description of the incident and click the Save button

Expected Results: The incident along with the change you made will save successfully.

Actual Results: You receive the following error: Error 500 - Internal Server Error. The server could not retrieve the document due to server-configuration or other technical problems. Contact your site administrator.

Technical Details:

Error from app-niku.log

ERROR 2009-07-07 15:53:24,125 [http-80-Processor9] niku.xql2 (admin:5087984__40f2e79e:itl.incidentObjectSave)
Invalid Throw element, missing sub elements:com.niku.xql2.XQLVisitorException 
ERROR 2009-07-07 15:54:27,859 [http-80-Processor9] object.ODFAbstractObjectImpl
(admin:5087984__40f2e79e:itl.incidentObjectSaveU) Could not save document document exception 
java.lang.ArrayIndexOutOfBoundsException: 0
at com.niku.odf.object.ODFAbstractObjectImpl.processAttachmentNames(ODFAbstractObjectImpl.java:2921) 
at com.niku.odf.object.ODFAbstractObjectImpl.processAttachments(ODFAbstractObjectImpl.java:2588) 
at com.niku.odf.object.ODFObjectImpl.update(ODFObjectImpl.java:2292) 
at com.niku.odf.object.ODFObjectImpl.update(ODFObjectImpl.java:2170) 
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) 
at com.niku.union.service.ServiceControlImpl.processRequest(ServiceControlImpl.java:759) 
at com.niku.union.service.ServiceControlImpl.processRequest(ServiceControlImpl.java:213) 
at com.niku.union.web.WebServiceAdapter.processRequest(WebServiceAdapter.java:195) 
at com.niku.union.web.PortletController.processServiceRequest(PortletController.java:1323) 
at com.niku.union.web.PortletController.processProcessActionRequest(PortletController.java:229) 
at com.niku.union.web.PortletController.processRequest(PortletController.java:156) 
at com.niku.union.web.WebActionController.processAction(WebActionController.java:1090) 
at com.niku.union.web.WebActionController.processRequest(WebActionController.java:170) 
at com.niku.union.web.WebControlServlet.service(WebControlServlet.java:319) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
at com.niku.union.web.filter.GZIPResponseFilter.doFilter(GZIPResponseFilter.java:121) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:29) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
at java.lang.Thread.run(Thread.java:595) 
ERROR 2009-07-07 15:54:27,875 [http-80-Processor9] service.ODFService
(admin:5087984__40f2e79e:itl.incidentObjectSaveU) processRequest Exception 
com.niku.union.odf.exception.ODFException: Error writing file document to file system 
at com.niku.odf.object.ODFAbstractObjectImpl.processAttachmentNames(ODFAbstractObjectImpl.java:2974) 
at com.niku.odf.object.ODFAbstractObjectImpl.processAttachments(ODFAbstractObjectImpl.java:2588) 
at com.niku.odf.object.ODFObjectImpl.update(ODFObjectImpl.java:2292) 
at com.niku.odf.object.ODFObjectImpl.update(ODFObjectImpl.java:2170) 
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) 
at com.niku.union.service.ServiceControlImpl.processRequest(ServiceControlImpl.java:759) 
at com.niku.union.service.ServiceControlImpl.processRequest(ServiceControlImpl.java:213) 
at com.niku.union.web.WebServiceAdapter.processRequest(WebServiceAdapter.java:195) 
at com.niku.union.web.PortletController.processServiceRequest(PortletController.java:1323) 
at com.niku.union.web.PortletController.processProcessActionRequest(PortletController.java:229) 
at com.niku.union.web.PortletController.processRequest(PortletController.java:156) 
at com.niku.union.web.WebActionController.processAction(WebActionController.java:1090) 
at com.niku.union.web.WebActionController.processRequest(WebActionController.java:170) 
at com.niku.union.web.WebControlServlet.service(WebControlServlet.java:319) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
at com.niku.union.web.filter.GZIPResponseFilter.doFilter(GZIPResponseFilter.java:121) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:29) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
at java.lang.Thread.run(Thread.java:595) 
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 
at com.niku.odf.object.ODFAbstractObjectImpl.processAttachmentNames(ODFAbstractObjectImpl.java:2921) 
... 37 more

Solution:

Workaround:
None

Status/Resolution:
This issue is no longer reproducible in 12.0.5 and above.

Keywords: CLARITYKB, CLRT-40112, process, bpm, lock attributes, document, Error 500, Internal Server Error, clarity8open, clarity12resolved.