Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Staffing Profile showing "Decompress mismatch: components size is bigger then compressed data"

Highlighted
Bharath_Kumar
Super Collector

Staffing Profile showing "Decompress mismatch: components size is bigger then compressed data"

Hi team,

 

We have an issue when the Staffing Profile start date was changed from Jan 1, 2013 to Nov 1, 2012.

 

Request has the Start period of November-2012 and Finish Period as June-2013.

 

We are currently running on HP PPM 7.5 SP7.

 

When the Staffing profile start date is changed and then Project window is refreshed, then clicked on the Staffing Profile link we have the below error, however after reverting date to Jan 1, 2013 from Nov 1, 2012 the error is not present.

 

Please share information on this issue resolutio, if anyone have faced this issue before.

 

An Error has Occurred 
 
 A database exception has occurred. This is an internal error. Please consult your PPM Administrator.
 The following is a stack trace of the exception:
com.mercury.itg.exceptions.InfrastructureException:Decompress mismatch: components size is bigger then compressed data
com.mercury.itg.rm.util.impl.CompressedDayWorkCalendar.decompress(CompressedDayWorkCalendar.java:109)
com.mercury.itg.rm.util.impl.CompressedDayWorkCalendar.getWorkCalendar(CompressedDayWorkCalendar.java:47)
com.mercury.itg.rm.staffing.impl.PositionImpl.getDemandForcast(PositionImpl.java:332)
com.mercury.itg.rm.staffing.impl.PositionImpl.calculateUnmetDemand(PositionImpl.java:541)
com.mercury.itg.rm.staffing.impl.PositionImpl.hasNonZeroUnmetDemandBucket(PositionImpl.java:607)
com.mercury.itg.rsc.staffing.uiutil.StaffingProfileUtils.createPositionSection(StaffingProfileUtils.java:948)
com.mercury.itg.rsc.staffing.web.EditStaffingProfileAction.createTableData(EditStaffingProfileAction.java:316)
com.mercury.itg.rsc.staffing.web.EditStaffingProfileAction.doExecute(EditStaffingProfileAction.java:165)
com.mercury.itg.common.web.BaseAction.execute(BaseAction.java:146)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
org.apache.portals.bridges.struts.PortletTilesRequestProcessor.process(PortletTilesRequestProcessor.java:50)
com.mercury.itg.common.web.PortletTilesRequestProcessor.process(PortletTilesRequestProcessor.java:47)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
com.mercury.itg.servlet.I18NFilter.doFilter(I18NFilter.java:34)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
com.mercury.itg.servlet.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:77)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
com.kintana.core.web.filter.stinger.ValidationFilter.applyFilter(ValidationFilter.java:93)
com.kintana.core.web.filter.stinger.ValidationFilter.doFilter(ValidationFilter.java:66)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
com.kintana.core.web.filter.ControlFilter.applyFilter(ControlFilter.java:733)
com.kintana.core.web.filter.ControlFilter.doFilter(ControlFilter.java:1143)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
com.kintana.core.web.filter.MultipartRequestFilter.applyFilter(MultipartRequestFilter.java:79)
com.kintana.core.web.filter.BaseFilter.doFilter(BaseFilter.java:53)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
com.kintana.core.web.filter.I18nFilter.applyFilter(I18nFilter.java:44)
com.kintana.core.web.filter.BaseFilter.doFilter(BaseFilter.java:53)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
com.kintana.core.web.filter.Log4jFilter.applyFilter(Log4jFilter.java:43)
com.kintana.core.web.filter.BaseFilter.doFilter(BaseFilter.java:53)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:662)
 

1 REPLY
cotocald
Regular Collector

Re: Staffing Profile showing "Decompress mismatch: components size is bigger then compressed da

It has two possible causes:


1) Sum of repeat counts in ITG_COMPRESSED_ELEMENTS is less than Staffing Profile's timespan. 
2) The other way around.

Identifying Cause

The easiest is to look at the error and see what is says.

If it says components size is bigger than compressed data, it simply means CompressedElements contains less.

If it says components size is smaller than compressed data, then Compressed Elements contains more.

Check the data to be fully certain.

Run the following SQLs against the DB:

SELECT   (ROUND (sp.finish_date - sp.start_date) - SUM (ice.repeats_count)) diff,
         ass.resource_assignment_id, owner_type, pos.position_id,
         sp.staffing_profile_id, sp.staffing_profile_name
    FROM itg_compressed_elements ice,
         rsc_staffing_profiles sp,
         rsc_positions pos,
         rsc_resource_assignments ass
   WHERE pos.staffing_profile_id = sp.staffing_profile_id
     AND ass.position_id = pos.position_id
     AND ice.owner_type IN ('ACTUAL_EFFORT', 'ALOC_EFFORT')
     AND ice.owner_id = ass.resource_assignment_id
GROUP BY ass.resource_assignment_id,
         ROUND (sp.finish_date - sp.start_date),
         ice.owner_type,
         sp.staffing_profile_id,
         sp.staffing_profile_name,
         pos.position_id
  HAVING (ROUND (sp.finish_date - sp.start_date) - SUM (ice.repeats_count)) <> 0
ORDER BY ice.owner_type, ass.resource_assignment_id, sp.staffing_profile_id;

SELECT   (ROUND (sp.finish_date - sp.start_date) - SUM (ice.repeats_count)) diff,
         pos.position_id, ice.owner_type, sp.staffing_profile_id,
         sp.staffing_profile_name
    FROM itg_compressed_elements ice,
         rsc_staffing_profiles sp,
         rsc_positions pos
   WHERE pos.staffing_profile_id = sp.staffing_profile_id
     AND ice.owner_type = 'FORECAST'
     AND ice.owner_id = pos.position_id
GROUP BY pos.position_id,
         ROUND (sp.finish_date - sp.start_date),
         ice.owner_type,
         sp.staffing_profile_id,
         sp.staffing_profile_name
  HAVING (ROUND (sp.finish_date - sp.start_date) - SUM (ice.repeats_count)) <> 0
ORDER BY ice.owner_type, sp.staffing_profile_id, sp.staffing_profile_name;

Notice the DIFF value. 

If it is negative, that means ITG_COMPRESSED_ELEMENTS is larger than Staffing Profile'stimespan.
If it is positive, then ITG_COMPRESSED_ELEMENTS is smaller than Staffing Profile's timespan.

 

 1. To fix this, please backup the itg_compressed_elements table first.

 

  • If Compressed Elements smaller than Staffing Profile's timespan


 If ITG_COMPRESSED_ELEMENTS does not have enough data (i.e. compressed elements < components) then can simply add rows intocompressed elements to make up the difference.  Populate this with zero.  The following SQLs will do this:


INSERT INTO itg_compressed_elements
(COMPRESSED_ELEMENT_ID, VERSION, REPEATS_COUNT,
VALUE, OWNER_ID, OWNER_TYPE, COMPRESSED_ENTRY_SEQ, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE)
SELECT ITG_COMPRESSED_ELEMENTS_S.NEXTVAL, VERSION, diff, 0, ass_id, owner_type, seq, 1, CURRENT_DATE, 1, CURRENT_DATE
FROM (SELECT MAX(ice.VERSION) VERSION, (ROUND(sp.finish_date - sp.start_date) - SUM(ice.repeats_count)) diff,
ass.resource_assignment_id ass_id, MAX(ice.owner_type) owner_type, MAX(ice.compressed_entry_seq)+1 seq
FROM itg_compressed_elements ice, rsc_staffing_profiles sp, rsc_positions pos, rsc_resource_assignments ass
WHERE pos.staffing_profile_id = sp.staffing_profile_id
AND ass.position_id = pos.position_id
AND ice.owner_type = 'ACTUAL_EFFORT'
AND ice.owner_id = ass.resource_assignment_id
GROUP BY ass.resource_assignment_id, ROUND(sp.finish_date - sp.start_date)
HAVING (ROUND(sp.finish_date - sp.start_date) - SUM(ice.repeats_count)) > 0);



INSERT INTO itg_compressed_elements
(COMPRESSED_ELEMENT_ID, VERSION, REPEATS_COUNT,
VALUE, OWNER_ID, OWNER_TYPE, COMPRESSED_ENTRY_SEQ, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE)
SELECT ITG_COMPRESSED_ELEMENTS_S.NEXTVAL, VERSION, diff, 0, ass_id, owner_type, seq, 1, CURRENT_DATE, 1, CURRENT_DATE
FROM (SELECT MAX(ice.VERSION) VERSION, (ROUND(sp.finish_date - sp.start_date) - SUM(ice.repeats_count)) diff,
ass.resource_assignment_id ass_id, MAX(ice.owner_type) owner_type, MAX(ice.compressed_entry_seq)+1 seq
FROM itg_compressed_elements ice, rsc_staffing_profiles sp, rsc_positions pos, rsc_resource_assignments ass
WHERE pos.staffing_profile_id = sp.staffing_profile_id
AND ass.position_id = pos.position_id
AND ice.owner_type = 'ALOC_EFFORT'
AND ice.owner_id = ass.resource_assignment_id
GROUP BY ass.resource_assignment_id, ROUND(sp.finish_date - sp.start_date)
HAVING (ROUND(sp.finish_date - sp.start_date) - SUM(ice.repeats_count)) > 0);



INSERT INTO itg_compressed_elements
(COMPRESSED_ELEMENT_ID, VERSION, REPEATS_COUNT,
VALUE, OWNER_ID, OWNER_TYPE, COMPRESSED_ENTRY_SEQ, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE)
SELECT ITG_COMPRESSED_ELEMENTS_S.NEXTVAL, VERSION, diff, 0, pos_id, owner_type, seq, 1, CURRENT_DATE, 1, CURRENT_DATE
FROM (SELECT MAX(ice.VERSION) VERSION, (ROUND(sp.finish_date - sp.start_date) - SUM(ice.repeats_count)) diff,
pos.position_id pos_id, MAX(ice.owner_type) owner_type, MAX(ice.compressed_entry_seq)+1 seq
FROM itg_compressed_elements ice, rsc_staffing_profiles sp, rsc_positions pos
WHERE pos.staffing_profile_id = sp.staffing_profile_id
AND ice.owner_type = 'FORECAST'
AND ice.owner_id = pos.position_id
GROUP BY pos.position_id, ROUND(sp.finish_date - sp.start_date)
HAVING (ROUND(sp.finish_date - sp.start_date) - SUM(ice.repeats_count)) > 0);



Even though it seems that these three SQLs are very similar except for OWNER_TYPE, they are not.  The first two are the same, but FORECAST does not join through RSC_RESOURCE_ASSIGNMENTS.



  • If Compressed Elements larger than Staffing Profile's timespan

Check if these resource assignments can be removed (are not needed).

If yes, remove them.

If no, then remove some entries on compressed elements to fit the Staffing Profile's timespan.

=======================================================================================================

Actions to Take When Compressed Elements are Larger than Staffing Profile's Timespan

Either one of these action will address the issue.  They are not related and are not meant to be run in sequence.

·         Remove the position

Removing a position requires removal from ITG_COMPRESSED_ELEMENTS, RSC_RESOURCE_ASSIGNMENTS and RSC_POSITIONS.  Technically removing from RSC_POSITIONS will do the trick, but we might want to make sure other tables are cleaned up.

Cleanup ITG_COMPRESSED_ELEMENTS (Allocations and Actuals):
delete from itg_compressed_elements
where owner_type in ('ALOC_EFFORT', 'ACTUAL_EFFORT')
and owner_id IN (select ra.resource_assignment_id from rsc_resource_assignments ra
where ra.position_id = <POSITION_ID>);

Cleanup ITG_COMPRESSED_ELEMENTS (Forecast data):
delete from itg_compressed_elements
where owner_type = 'FORECAST'
and owner_id = <POSITION_ID>;

Cleanup RSC_RESOURCE_ASSIGNMENTS:
delete from rsc_resource_assignments
where position_id = <POSITION_ID>;

Delete from RSC_POSITIONS:
delete from rsc_positions
where position_id = <POSITION_ID>;

 

·         Truncate the Position

This involves removing data from ITG_COMPRESSED_ELEMENTS just enough to make sure data matches Staffing Profile's timespan.

For Actual Effort and Allocation:

DELETE FROM itg_compressed_elements dice
      WHERE dice.compressed_element_id IN (
               SELECT ice_sum.compressed_element_id
                 FROM (SELECT ice.compressed_element_id,
                              SUM(ice.repeats_count) OVER (PARTITION BY ice.owner_type, ice.owner_id ORDER BY ice.compressed_entry_seq) count_sum,
                              ROUND(sp.finish_date - sp.start_date) sp_timespan,
                              ice.compressed_entry_seq, ice.owner_id,
                              ice.owner_type
                         FROM itg_compressed_elements ice,
                              rsc_resource_assignments ra,
                              rsc_positions pos,
                              rsc_staffing_profiles sp
                        WHERE pos.position_id = <POSITION_ID>
                          AND ra.position_id = pos.position_id
                          AND sp.staffing_profile_id = pos.staffing_profile_id
                          AND ice.owner_id = ra.resource_assignment_id
                          AND ice.owner_type IN ('ALOC_EFFORT', 'ACTUAL_EFFORT')) ice_sum
                WHERE ice_sum.count_sum > ice_sum.sp_timespan);

UPDATE itg_compressed_elements uice
   SET uice.repeats_count =
          (SELECT   uice.repeats_count - (SUM(ice.repeats_count) - ROUND(sp.finish_date - sp.start_date))
               FROM itg_compressed_elements ice,
                    rsc_positions pos,
                    rsc_resource_assignments ra,
                    rsc_staffing_profiles sp
              WHERE sp.staffing_profile_id = pos.staffing_profile_id
                AND ice.owner_id = ra.resource_assignment_id
  AND ra.position_id = pos.position_id
                AND ice.owner_type = uice.owner_type
                AND ice.owner_id = uice.owner_id
           GROUP BY ROUND (sp.finish_date - sp.start_date))
 WHERE EXISTS (
          SELECT 1
            FROM (SELECT   MAX (ice.compressed_entry_seq) compressed_entry_seq,
                           ice.owner_id, ice.owner_type
                      FROM itg_compressed_elements ice,
                           rsc_positions pos,
                           rsc_resource_assignments ra,
                           rsc_staffing_profiles sp
                     WHERE pos.position_id = <POSITION_ID>
                       AND sp.staffing_profile_id = pos.staffing_profile_id
                       AND ra.position_id = pos.position_id
                       AND ice.owner_id = ra.resource_assignment_id
                       AND ice.owner_type IN ('ALOC_EFFORT', 'ACTUAL_EFFORT')
                  GROUP BY ice.owner_id, ice.owner_type) last_row
           WHERE uice.owner_type = last_row.owner_type
             AND uice.owner_id = last_row.owner_id
             AND uice.compressed_entry_seq = last_row.compressed_entry_seq);

 

For Forecast:

DELETE FROM itg_compressed_elements dice
      WHERE dice.compressed_element_id IN (
               SELECT ice_sum.compressed_element_id
                 FROM (SELECT ice.compressed_element_id,
                              SUM(ice.repeats_count) OVER (PARTITION BY ice.owner_type, ice.owner_id ORDER BY ice.compressed_entry_seq) count_sum,
                              ROUND (sp.finish_date - sp.start_date) sp_timespan,
                              ice.compressed_entry_seq, ice.owner_id,
                              ice.owner_type
                         FROM itg_compressed_elements ice,
                              rsc_positions pos,
                              rsc_staffing_profiles sp
                        WHERE pos.position_id = <POSITION_ID>
                          AND sp.staffing_profile_id = pos.staffing_profile_id
                          AND ice.owner_id = pos.position_id
     AND ice.owner_type = 'FORECAST') ice_sum
                WHERE ice_sum.count_sum > ice_sum.sp_timespan);

UPDATE itg_compressed_elements uice
   SET uice.repeats_count =
          (SELECT   uice.repeats_count - (SUM(ice.repeats_count) - ROUND(sp.finish_date - sp.start_date))
               FROM itg_compressed_elements ice,
                    rsc_positions pos,
                    rsc_staffing_profiles sp
              WHERE sp.staffing_profile_id = pos.staffing_profile_id
                AND ice.owner_id = pos.position_id
                AND ice.owner_type = uice.owner_type
                AND ice.owner_id = uice.owner_id
           GROUP BY ROUND (sp.finish_date - sp.start_date))
 WHERE EXISTS (
          SELECT 1
            FROM (SELECT   MAX (ice.compressed_entry_seq) compressed_entry_seq,
                           ice.owner_id, ice.owner_type
                      FROM itg_compressed_elements ice,
                           rsc_positions pos,
                           rsc_staffing_profiles sp
                     WHERE pos.position_id = 30040
                       AND sp.staffing_profile_id = pos.staffing_profile_id
                       AND ice.owner_id = pos.position_id
                       AND ice.owner_type = 'FORECAST'
                  GROUP BY ice.owner_id, ice.owner_type) last_row
           WHERE uice.owner_type = last_row.owner_type
             AND uice.owner_id = last_row.owner_id
             AND uice.compressed_entry_seq = last_row.compressed_entry_seq);

 


2. Commit the change to the database.

3. Then reopen the Staffing Profile

NOTE: There is no need to restart the server for this.

 

 

-- Remember to give Kudos to answers! (click the KUDOS star)
//Add this to "OnDomLoad" event