Clarity: Error 500 generated when attempting to deactivate an Entity Fiscal Time Period

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

Description:

When attempting to 'Deactivate' a Fiscal Time Period, an error message is generated

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

This happens for ALL Fiscal Time Periods.
If you create a new time period, activate it and immediately try to deactivate it, the error message will appear. This should not occur because the period has not been used yet.

Root Cause:
The issue is caused by the application not recognizing the parent object on a grandchild object where a Fiscal Time Varying attribute is configured.
If a Fiscal TSV attribute is created on a Grand Child sub Object under the Project Object associated with the Entity, this error will occur.

Configuration:

  1. Create a SubObject under the Project Object > 'Project Child'

  2. Create a SubObject under the 'Project Child' > 'Project Grand Child'

  3. On the 'Project Grand Child' object, create a new Fiscal TSV Attribute and configure it in the layouts

  4. Find out the name of the Department or Location OBS that is associated with the Project Object and look to see the name of the associated Entity

  5. Follow the steps below to deactivate the attribute

In testing the configuration, removing the Fiscal TSV attribute on the Project Grand Child Sub Object allows the period to be deactivated.
In testing the configuration using a custom Master Object instead of the Project Master Object, the error message did not appear.

Steps to Reproduce:

  1. Login to Clarity as an administrator

  2. Administration > Finance: Setup > Entities > myEntity > Fiscal Time Periods (revmgr.timePeriodList)

  3. Select / Checkmark a period that is currently activated or create a new time period, activate it and immediately try to deactivate it

  4. Actions Menu > Deactivate

Expected Result: No Error to be generated. The period should be deactivated ; it is not being used yet.

Actual Result: Error 500 is generated. The log file shows a NullPointerException message

Log File Details:

service.ODFService (clarity:admin:5285879__AE45081E-F6AA-4D30-B902-ECC1A41BF0A5:revmgr.activateTimePeriods) 
processRequest Exception
com.niku.union.odf.exception.ODFException:
com.niku.union.odf.exception.ODFException: java.lang.NullPointerException
 at com.niku.revenue.timeperiod.FiscalTimePeriodActivateService.process(FiscalTimePeriodActivateService.java:72)
 at com.niku.revenue.plan.CustomODFService.doProcess(CustomODFService.java:54)
 at com.niku.odf.service.BaseODFService.processRequest(BaseODFService.java:110)
 at com.niku.union.service.binding.ServiceControlBindingJava.processRequest(ServiceControlBindingJava.java:58)
 at com.niku.union.service.ServiceControlImpl.processRequest(ServiceControlImpl.java:749)
 at com.niku.union.service.ServiceControlImpl.processRequest(ServiceControlImpl.java:211)
 at com.niku.union.web.WebServiceAdapter.processRequest(WebServiceAdapter.java:194)
 at com.niku.union.web.PortletController.processServiceRequest(PortletController.java:1393)
 at com.niku.union.web.PortletController.processProcessActionRequest(PortletController.java:232)
 at com.niku.union.web.PortletController.processRequest(PortletController.java:159)
 at com.niku.union.web.WebActionController.processAction(WebActionController.java:1124)
 at com.niku.union.web.WebActionController.processRequest(WebActionController.java:163)
 at com.ca.clarity.uif.service.vxml.VXMLService.processRequest(VXMLService.java:403)
 at com.ca.clarity.uif.UIServlet.service(UIServlet.java:66)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at com.niku.union.web.filter.GZIPResponseFilter.doFilter(GZIPResponseFilter.java:130)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:56)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: com.niku.union.odf.exception.ODFException:java.lang.NullPointerException
 at com.niku.revenue.timeperiod.FiscalTimePeriodActivateService.deactivateTimePeriods(FiscalTimePeriodActivateService.java:108)
 at com.niku.revenue.timeperiod.FiscalTimePeriodActivateService.process(FiscalTimePeriodActivateService.java:66)
 ... 33 more
 Caused by: java.lang.NullPointerException
 at com.niku.revenue.timeperiod.FiscalTimePeriodActivateService.getCustomFTSVDynaQuery(FiscalTimePeriodActivateService.java:160)
 at com.niku.revenue.timeperiod.FiscalTimePeriodActivateService.deactivateTimePeriods(FiscalTimePeriodActivateService.java:83)
 ... 34 more

Solution:

Workaround:

None.

Status/Resolution:
Resolved in Clarity 13.1.0

Keywords: CLARITYKB, CLRT-67791, clarity13resolved, clarity1310resolved.