Copied to clipboard

Flag this post as spam?

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


  • Gerty Engrie 130 posts 489 karma points c-trib
    Nov 07, 2014 @ 12:46
    Gerty Engrie
    0

    NHibernate.NonUniqueResultException: query did not return a unique result

    Hello, 

    first things first :)
    Umbraco version: 6.2.2
    Courier version: Courier_2.7.8.43.v6 

    We have a 3 environment setup TEST - ACC - PROD ( load balanced & behind akamai, courier pushes to internal url of the master environment). 

    This was a clean umbraco setup 6.2.1 (july 2014) with courier 2.7.8.x (can't remember version number, latest available at that moment). All of a sudden (few weeks ago) we have begin experiencing nodes that would not show there updates on the PROD (pushed with Courier). After trying a few times they would suddenly popup. A week later we were having trouble with locallinks. They would appear in TEST as locallink: ID and in ACC as locallink:GUID . I know Courier does this replace on TEST in order to map it to the same node on ACC. But it seemed that never happened.

    We decided to upgrade to the newest version 2.7.8.43 (hotfix) first. 

    And then we dived into the logs which uncoverd this issue: 

    6-11-2014 22:55:22; Umbraco.Courier.DataResolvers.LocalLinks: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.NonUniqueResultException: query did not return a unique result: 12
       at NHibernate.Impl.AbstractQueryImpl.UniqueElement(IList list)
       at NHibernate.Impl.AbstractQueryImpl.UniqueResult[T]()
       at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateProvider.GetNodeId(Guid uniqueId)
       at Umbraco.Courier.DataResolvers.Helpers.LocalLinkResolver.<replaceGuidWithID>b__0(Match match)
       at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat)
       at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator, Int32 count, Int32 startat)
       at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator)
       at System.Text.RegularExpressions.Regex.Replace(String input, String pattern, MatchEvaluator evaluator, RegexOptions options)
       at Umbraco.Courier.DataResolvers.Helpers.LocalLinkResolver.replaceGuidWithID(String val)
       at Umbraco.Courier.DataResolvers.Helpers.LocalLinkResolver.ReplaceLocalLinks(String value, Boolean toUnique, Item item)
       at Umbraco.Courier.DataResolvers.LocalLinks.Extracting(Item item)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Umbraco.Courier.Core.ResolutionManager.executeResolver(Item item, ItemEvent e, ItemProvider provider)

    If I understand the error correctly it searches the node with the guid, but finds 12 nodes?? 

    Any advice would be greatly appreciated, 

    thanks, 

    Gerty 

  • Paul Sterling 718 posts 1534 karma points MVP 8x admin c-trib
    Nov 07, 2014 @ 19:19
    Paul Sterling
    0

    Hi Gerty -

    Indeed a wierd error...I think you have some outdated (or duplicate) cache data.  Try removing all the Courier cache on both the source and target and doing a fresh deployment.  

    Also, you may want to consider using the last "stable" nightly which is Courier_2.7.8.35.v6

    -Paul

  • Gerty Engrie 130 posts 489 karma points c-trib
    Nov 07, 2014 @ 23:32
    Gerty Engrie
    0

    Hi Paul, 

    I have emptied all cache data (app_data/courier/cache/revision) because i was indeed thinking the same thing, that it could be related. But it didn't help. The same issue was already in the previous version we were running too. 

    It is such an awkward error that i even began looking in the database to see if I could find orphanned nodes, but so far i didn't find any. 

    Could this error have anything to do with filepermissions (i can't control this, I depend on a servicedesk to take care of that for me). 

    thanks in advance, 

    Gerty

  • Paul Sterling 718 posts 1534 karma points MVP 8x admin c-trib
    Nov 07, 2014 @ 23:44
    Paul Sterling
    0

    What do you see when you select from the umbracoNode table where uniqueId = the GUID in place of the node id in the "locallink:<guid>"?

    That's where the multiple results are coming from based on the stack trace you sent.  

    -Paul

  • Gerty Engrie 130 posts 489 karma points c-trib
    Nov 10, 2014 @ 11:00
    Gerty Engrie
    0

    Hi Paul, 

    i just verified, on both environments there is only 1 result for that GUID. 

  • Paul Sterling 718 posts 1534 karma points MVP 8x admin c-trib
    Nov 10, 2014 @ 17:32
    Paul Sterling
    0

    Hi Gerty -

    Can you contact us on the support desk so we can work out the specifics of your environment?  It's not something we can repro and so suspect an environment specific issue.

    http://umbraco.com/help-and-support/customer-area/courier-support-and-download

    -Paul

Please Sign in or register to post replies

Write your reply to:

Draft