Cascade Skyline - with Microsoft Logo and Project Support header - author Brian Smith

Project Server 2007: Reporting (Project Publish) queue job fails to complete

Project Server 2007: Reporting (Project Publish) queue job fails to complete

Rate This
  • Comments 14

** Update 6/27/2012 - The June 2012 CU is available.  Project Server 2007 - http://support.microsoft.com/kb/2687258 - the Office Server package (Includes Project Server)  - http://support.microsoft.com/kb/2687256 No clean up required - the June CU will stop the problem happening. ***

*** Update 10/16/2013 If you happened upon this post and are using Project and Project Server 2013 then we can confirm this has been identified as an issue there too - and fixed in the October 2013 Cumulative update for Project Server 2013 - http://blogs.technet.com/b/projectsupport/archive/2013/10/15/microsoft-project-server-2010-and-2013-october-2013-cu-announcement.aspx The macro option will usually work too - but we have seen cases where manually scheduled tasks or date constrained tasks will not be corrected by the macro. ***

This is an issue that several of my readers raised in response to the posting about the orphan baseline posting a few weeks ago, and we know that this is something that more and more customers are now hitting.  The problem was introduced with the February 2012 Cumulative Update for Project Server 2007, and was also present in the April CU too – so if you have installed either of these and have started seeing Reporting (Project Publish) queue job fails to complete then read on.

The symptoms are that a project will successfully save and publish, but the Reporting (Project Publish) job will fail to complete, and the error will look something like this (truncated – but the ReportingProjectChangeMessageFailed piece will be repeated based on your queue setting for the retry limit.

Error summary/areas:
Reporting message processor failed
ReportingProjectChangeMessageFailed
Queue
GeneralQueueJobFailed
Error details:

<?xml version="1.0" encoding="utf-16"?>
<errinfo>
  <general>
    <class name="Reporting message processor failed">
      <error id="24006" name="ReportingProjectChangeMessageFailed" uid="d120becb-26a3-4fbe-8341-38a5c273453d" QueueMessageBody="Project UID='0b9e52ec-6bb6-4ca3-823b-d7561d821d1c'. PublishType='ProjectPublish'" Error="Object reference not set to an instance of an object." />
    </class>
    <class name="Queue">
      <error id="26000" name="GeneralQueueJobFailed" uid="4c6270ce-0735-44b3-ac1c-59bb0ff69efc" JobUID="a4a1f651-0997-4770-8099-efe02340967a" ComputerName="BRISMITH2007" GroupType="ReportingProjectPublish" MessageType="ReportProjectPublishMessageEx" MessageId="1" Stage="" />
    </class>
  </general>
</errinfo>

The issue occurs because we are missing a NULL check when accessing the task baseline cost – so if it is NULL we get the “Object reference not set to an instance of an object” message.  We are working on a hotfix to correct this behavior, but we also have a workaround that can provide some immediate relief.  This is a macro that can be run on affected project and will set a zero (non-NULL) assignment baseline fixed cost in place of the NULL we are tripping up on.  Below is the macro code that will need to be added to Project in the macro editor, and executed against the plan.  DISCLAIMER: As with any macro code you should review and understand exactly what this code is doing and that you are comfortable to run this on your own plans (and read the disclaimer) – and should also execute this in a test environment first.  It would also be good practice to take an Administrative Backup in your production system to ensure you have good backup copies of your plans (in addition to any normal SQL Server backup).  Also worth mentioning at this point that you should really have the number of project administrative backups set to give you several versions of your plan (Project Retention Policy (versions) – under Server Settings, Database Administration, Schedule Backup.

'DISCLAIMER OF WARRANTY
'
'THIS FIX CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
'MICROSOFT FURTHER DISCLAIMS ALL IMPLIED WARRANTIES INCLUDING WITHOUT
'LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR OF FITNESS
'FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF THE USE OR
'PERFORMANCE OF THE CODE REMAINS WITH YOU.
'
'IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES
'WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
'BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION,
'OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE
'THIS MACRO, EVEN IF MICROSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF
'SUCH DAMAGES. BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR
'LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE
'ABOVE LIMITATION MAY NOT APPLY TO YOU.

 

'This macro attempts to work around the reporting publish failure that occurs when there are tasks
'with baselines and where the BaselineCost contour is NULL. The symptoms that you see in the queue
'for the "Reporting (Project Publish)" job has details similar to:
'
'<class name="Reporting message processor failed">
'<error id="24006" name="ReportingProjectChangeMessageFailed"
'uid="c72e20a7-9b7f-487b-9da2-19460b2e6c32"
'QueueMessageBody="Project UID='8e074f24-1064-47dd-bce5-c2dad8d556c8'.
'PublishType='ProjectPublish'" Error="Object reference not set to an instance of an object." />


'This code simply walks through the tasks in the tasks in the project and if there are
'baseline(s) set, then the code sets a time scaled baseline cost = 0 on the day prior to
'where the baseline start is scheduled.  This sets the baseline contour so that the
'"Object reference not set to an instance of an object" problem can be overcome during the
'reporting publish job.

Sub FixPublish()

Dim t As Tasks
Dim tsv As TimeScaleValues
Dim i As Long
Dim bCalc As Boolean

On Error Resume Next

'get the current application calculation state
bCalc = Application.Calculation
'set calculation to manual (helps with performance while the code runs)
Application.Calculation = pjManual

Set t = ActiveProject.Tasks

'walk through the tasks in the project. If a task as a baseline(s) then set a timescaled baselinecost = 0
For i = 1 To t.Count
    If Not t(i) Is Nothing Then
        If t(i).BaselineStart <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).BaselineStart - 1, t(i).BaselineStart - 1, pjTaskTimescaledBaselineCost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline1Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline1Start - 1, t(i).Baseline1Start - 1, pjTaskTimescaledBaseline1Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline2Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline2Start - 1, t(i).Baseline2Start - 1, pjTaskTimescaledBaseline2Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline3Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline3Start - 1, t(i).Baseline3Start - 1, pjTaskTimescaledBaseline3Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline4Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline4Start - 1, t(i).Baseline4Start - 1, pjTaskTimescaledBaseline4Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline5Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline5Start - 1, t(i).Baseline5Start - 1, pjTaskTimescaledBaseline5Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline6Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline6Start - 1, t(i).Baseline6Start - 1, pjTaskTimescaledBaseline6Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline7Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline7Start - 1, t(i).Baseline7Start - 1, pjTaskTimescaledBaseline7Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline8Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline8Start - 1, t(i).Baseline8Start - 1, pjTaskTimescaledBaseline8Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline9Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline9Start - 1, t(i).Baseline9Start - 1, pjTaskTimescaledBaseline9Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
        If t(i).Baseline10Start <> "NA" Then
            Set tsv = t(i).TimeScaleData(t(i).Baseline10Start - 1, t(i).Baseline10Start - 1, pjTaskTimescaledBaseline10Cost, pjTimescaleDays)
            If tsv(1).Value = "" Then
                tsv(1).Value = 0
            End If
        End If
    End If
Next

'fix the project summary task
With ActiveProject.ProjectSummaryTask
    If .BaselineStart <> "NA" Then
        Set tsv = .TimeScaleData(.BaselineStart - 1, .BaselineStart - 1, pjTaskTimescaledBaselineCost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline1Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline1Start - 1, .Baseline1Start - 1, pjTaskTimescaledBaseline1Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline2Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline2Start - 1, .Baseline2Start - 1, pjTaskTimescaledBaseline2Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline3Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline3Start - 1, .Baseline3Start - 1, pjTaskTimescaledBaseline3Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline4Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline4Start - 1, .Baseline4Start - 1, pjTaskTimescaledBaseline4Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline5Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline5Start - 1, .Baseline5Start - 1, pjTaskTimescaledBaseline5Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline6Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline6Start - 1, .Baseline6Start - 1, pjTaskTimescaledBaseline6Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline7Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline7Start - 1, .Baseline7Start - 1, pjTaskTimescaledBaseline7Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline8Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline8Start - 1, .Baseline8Start - 1, pjTaskTimescaledBaseline8Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline9Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline9Start - 1, .Baseline9Start - 1, pjTaskTimescaledBaseline9Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
    If .Baseline10Start <> "NA" Then
        Set tsv = .TimeScaleData(.Baseline10Start - 1, .Baseline10Start - 1, pjTaskTimescaledBaseline10Cost, pjTimescaleDays)
        If tsv(1).Value = "" Then
            tsv(1).Value = 0
        End If
    End If
End With
           
'set the application calculation state back the way it was
Application.Calculation = bCalc
           
End Sub

To use this macro you can follow these steps:

1. Open Project Professional 2007 and connect to your server instance having the problem.

2. Go to Tools > Macro > Security.

3. Note the Security Level.

4. Set Security Level to Low or Medium.  This will allow the macro to run.

5. Go to Tools, Macro, Visual Basic Editor (or alt+F11)

6. Copy the text from the macro above, from the first line of the disclaimer to the End sub line

7. Double click ThisProject in the Visual Basic Editor, and paste in the macro to the window that opens (probably titled Project1 – ThisProject(Code)

8. Save this plan as a file if you need to use again, as FixPublishError.mpp, and return to the normal Microsoft Project view (Alt+F11)

9. Open the plan whose Reporting (Project Publish) job fails.

10. Go to Tools > Macro > Macros…

11. Select the FixPublishError.mpp!FixPublish macro.

12. Click Run. It will take a few seconds to a minute for the macro to run.

13. Save and publish the plan.

14. Monitor the queue by going to PWA > Personal Settings > My queued jobs.

15. Confirm that the jobs related to your plan complete successfully.

16. Reset Security Level to what is was before changing it to Low.

There is one condition that currently isn’t resolved by the macro, and that relates to hitting the NULL value for any ghost tasks you might have in your plan (these can exist due to dependencies on tasks from other plans).  It is possible that this will be resolved if the source project has already been fixed up – we are still reviewing this.

Thanks to Adrian for the fix up macro, Sriram for helping get this blog post out and for DFS and Christoph for the posts on my blog raising the issue.

Sorry for the inconvenience this issue has caused you, and I will update this post as we get more information regarding a more permanent fix.

Finally here are some lines from the ULS logs that relate to this problem – just to ensure that the search engines have something to digest and to help those searching on these terms.

05/23/2012 10:38:09.29    Microsoft.Office.Project.Server (0x0AE4)    0x0EE8    Project Server    Project Server Reporting    9e09    High    PWA:http://servername/PWA, SSP:SharedServices1, User: DOMAIN\User, PSI:   [RDS] ReportProjectPublishMessage for project 0b9e52ec-6bb6-4ca3-823b-d7561d821d1c failed. Error: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.Office.Project.DataEdit.Reporting.ReportingData.GetTaskBaselineCoreTimephasedDataSet(BaselineEntity[] baselineEntityArray, Int32 nIntervalLengthMinutes)     at Microsoft.Office.Project.Server.DataAccessLayer.ReportingProjectDal.TransferTimephasedData[T](Guid projectUID, TimephasedTransferInfo transferInfo, ReportingData timephasedReportingData, ProcessSourceData`1 processSourceData, GenerateTimephasedDataSet`1 generateTimephasedData, Int32 pageSize, LogStatsMethod logStats)     at Microsoft.Office.Project.Server.DataAccessLayer.ReportingProjectDal.UpdateTasksTimephasedData(Guid projectUID, ReportingProjectData projectData, ReportingData timephasedReportingData, Int32 pageSize, String& transferPhase, LogStatsMethod logProjStats)     at Microsoft.Office.Project.Server.BusinessLayer.ReportingLayer.ProjectPublishMessageProcessor.SaveProjectTimephaseData(String& transferPhase)     at Microsoft.Office.Project.Server.BusinessLayer.ReportingLayer.ProjectPublishMessageProcessor.runRDSTransformation(ReportProjectPublishMessageEx projectChangeMessage). Phase: SetAssignmentBaselineTimephasedFixedCost    3ff34f2c-815e-4f95-9798-7f17dc5737db

05/23/2012 10:38:09.29    Microsoft.Office.Project.Server (0x0AE4)    0x0EE8    Project Server    Project Server Reporting    9e05    Critical    Standard Information:PSI Entry Point:   Project User: Domain\User Correlation Id: 3ff34f2c-815e-4f95-9798-7f17dc5737db  PWA Site URL: http://servername/PWA  SSP Name: SharedServices1  PSError: ReportingProjectChangeMessageFailed (24006) RDS: The request to synchronize change(s) to project Project UID='0b9e52ec-6bb6-4ca3-823b-d7561d821d1c'. PublishType='ProjectPublish' failed.  Message: 'ReportingProjectChangeMessageFailed'  Error:Object reference not set to an instance of an object.    3ff34f2c-815e-4f95-9798-7f17dc5737db

05/23/2012 10:38:10.30    Microsoft.Office.Project.Server (0x0AE4)    0x0D18    Project Server    Project Server Queue    7h5x    Medium    PWA:http://servername/PWA, SSP:SharedServices1, User: DOMAIN\SSPAdmin, PSI:   [QUEUE] ProjectQ: Group  d4364343-3402-45ef-afd0-f84c8834e5d3 type = ReportingProjectPublish aborted at Message 1    e45e8c63-38fa-49d8-9555-710851b22c90

Leave a Comment
  • Please add 1 and 1 and type the answer here:
  • Post
  • Please hurry up with the CU... the macro doesn't work on my ghost / linked tasked as you mentioned above.  This is impacting the way we do business.

  • When oh When will the June 2012 CU be out?  This bug is costing us a LOT of administrative overhead!

  • We have a schedule for Cumulative Updates Michael, and the June CU will be out on 26th June.  Sorry for the inconvenience and administrative overhead this has caused.

    Best regards,

    Brian.

  • AWESOME!!!  I'll begin planning for QA Implementation and testing...

  • Hi Brian-

    It's good to see that, we are getting the CU by June end.

    I had a small doubt in my mind, As a Consultant, I am getting several reports on this Queue failure ad hoc from different PM and they are quite concern with the issue. Could you please confirm if this JuneCU will help to solve this publish issue.

    Thanks for your valuable time.

  • Worth checking the ULS logs Dev, to make sure the publish failure is the same one.  If the error is the same, and this blog post fixes the issue then the June CU will address the problem you are seeing. Nothing worse than waiting for a fix then finding that it doesn't fix the issue you are having.

    There is always a slight risk that a fix doesn't make it into a CU - if we find a late problem for example - but currently this one is on track.

    Best regards,

    Brian.

  • We are nearing the end of June.  Have you all confirmed the day that this will be available?  We are preparing our Change Management process to get this in as soon as possible.  It is feared that these issues are impacting the accuracy of reports as well.

  • Hi Michael, it is never really confirmed until it is out there - as there can be last minute hold-ups when the release cycle is so short - but we always aim for the last Tuesday in the month (apart from the December CU which tends to come out before the holiday break).  So it should be out 6/26 - tomorrow.  I haven't heard of any problems so far.

    Best regards,

    Brian.

  • Thank you Brian for keeping us up to date.  

  • Do you have a link to the June CU by chance?

  • Just updated the post with the links Michael - thanks for your patience!

  • If we were to install just the Hot Fix for the Project Server portion, that would take care of the above issues, correct?  I just don't want to 'fix' stuff that isn't being reported as an issue.  Would you recommend the Hot Fix only?

  • Correct Michael - you just need the Project Server hotfix for this issue.  Smaller download, quicker install and lower risk (or less testing).  Some prefer to load the SharePoint combined one just to keep up to date and get fixes for things they 'might' have - but your call.

    Best regards,

    Brian.

  • So far so good... the June CU seems to be working as hoped.  We have successfully tested it and our Microsoft Engineer tested it against our Production database that is onsite at Microsoft.  This was also a success.  We will be installing the CU into our production environment next week.

    Thank you for all of the help.

Page 1 of 1 (14 items)