Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mike Olund 45 posts 66 karma points
    Aug 08, 2012 @ 09:56
    Mike Olund
    0

    NullReferenceException from RevisionPackaging.Package()

    I'm using Courier 2.7.1.

    After processing around 520 items, I am getting a null reference exception from inside the Package() call.

    [NullReferenceException: Object reference not set to an instance of an object.] Umbraco.Courier.Core.Packaging.RevisionPackaging.‚() +797 Umbraco.Courier.Core.Packaging.RevisionPackaging.Package() +35

    This is the code:

    var engine = new RevisionPackaging(revisionName);
    engine.PackagedItem += this.engine_PackagedItem;
    engine.PackagedItemResource += this.engine_PackagedItemResource;
    engine.AddAllProvidersToQueue(true);
    engine.Package();
    engine.Dispose();

    I can catch the PackagingItem event to get the guid of the item that is causing the error, but I'm not sure how to debug this any further without source code of the Courier DLL's.

  • Mike Olund 45 posts 66 karma points
    Aug 08, 2012 @ 18:48
    Mike Olund
    0

    The last two events before it crashes are PackagedQueue and Completing.  It never reaches the Completed event.

    I think I might have to try .NET reflector next if I can't get any help from here.

  • Per Ploug 865 posts 3491 karma points MVP admin
    Aug 09, 2012 @ 09:20
    Per Ploug
    0

    Hi Mike

    I actually just pushed a 2.7.2 nightly which fixes a possible null reference in the packaging if you use the api and the AddAllProviders call, give that a try: 

    http://nightly.umbraco.org/UmbracoCourier/2.7.2/nightly%20builds/

    /Per

  • Mike Olund 45 posts 66 karma points
    Aug 09, 2012 @ 20:10
    Mike Olund
    0

    I'm getting a new error with 2.7.2.  Its happening even earlier.

    [IndexOutOfRangeException: Index was outside the bounds of the array.]  Umbraco.Courier.Core.Resource.ToByteArray(String rootDirectory) +222  Umbraco.Courier.RepositoryProviders.Local.GetResourceContents(ItemIdentifier itemId, Type itemType, Resource resource, String revisionAlias) in c:\Program Files (x86)\teamcity\buildAgent\work\ce7e5edc151a5a37\Contrib\Providers\Umbraco.Courier.RepositoryProviders\Local\Local.cs:360  Umbraco.Courier.Core.Packaging.RevisionPackaging.ƒ(ItemIdentifier itemId, ItemProvider provider, QueuedItemIdentifier itemInQueue) +1041  [PackageException: Unable to package item 'Document Registration Page Property Data' from provider 'PropertyData' into filename 'Registration Page_1121_Document_data']  Umbraco.Courier.Core.Packaging.RevisionPackaging.ƒ(ItemIdentifier itemId, ItemProvider provider, QueuedItemIdentifier itemInQueue) +1795  Umbraco.Courier.Core.Packaging.RevisionPackaging.˜() +656  Umbraco.Courier.Core.Packaging.RevisionPackaging.Package() +283
  • Mike Olund 45 posts 66 karma points
    Aug 09, 2012 @ 20:19
    Mike Olund
    0

    If I move the node causing the exception to the recycle bin, then I get another error from a different node:

     [ArgumentException: The relative virtual path '#additionalfees' is not allowed here.] System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +11587670 System.Web.Hosting.MapPathBasedVirtualPathProvider.CacheLookupOrInsert(String virtualPath, Boolean isFile) +548 Umbraco.Courier.Core.Helpers.IO.FileExists(String path) +113 Umbraco.Courier.Core.Resource.ToByteArray(String rootDirectory) +69 Umbraco.Courier.RepositoryProviders.Local.GetResourceContents(ItemIdentifier itemId, Type itemType, Resource resource, String revisionAlias) in c:\Program Files (x86)\teamcity\buildAgent\work\ce7e5edc151a5a37\Contrib\Providers\Umbraco.Courier.RepositoryProviders\Local\Local.cs:360 Umbraco.Courier.Core.Packaging.RevisionPackaging.ƒ(ItemIdentifier itemId, ItemProvider provider, QueuedItemIdentifier itemInQueue) +1041 [PackageException: Unable to package item 'Document How do I save money? Property Data' from provider 'PropertyData' into filename 'How do I save money?_1078_Document_data'] Umbraco.Courier.Core.Packaging.RevisionPackaging.ƒ(ItemIdentifier itemId, ItemProvider provider, QueuedItemIdentifier itemInQueue) +1795 Umbraco.Courier.Core.Packaging.RevisionPackaging.˜() +644 Umbraco.Courier.Core.Packaging.RevisionPackaging.Package() +283 pre>code>

     #additionalfees is a named anchor.

    mailto: links are causing the same error

     

Please Sign in or register to post replies

Write your reply to:

Draft