Copied to clipboard

Flag this post as spam?

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


  • Mathias Poulsen 18 posts 139 karma points
    Mar 10, 2016 @ 12:36
    Mathias Poulsen
    0

    A call to SetSessionId must occur before getting/setting a session or transaction

    While i was packaging a large set of documents and images (image cropper), this error occured about halfway there.

    Could anyone please describe what may be the error here?

    Also i am using UaaS.

    As an offtopic, how would you go about packaging/deploying ~2000 documents in UaaS?

    Something went wrong :(

    Here is some technical information that might help shed some light on whats happened:

    { "id": "fa239647-c8ff-4f02-bafc-260dc5b31867", "currentActivity": "Packaging: Document Dessertgrød med kaffe og chokolade Property Data", "name": "Umbraco.Courier.Core.Tasks.PackagingTask", "description": "Packaging revision: {0}", "total": 4510, "done": 2346, "complete": false, "error": false, "exception": null, "errors": null } Message: An error has occurred.

    Exception Message: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Umbraco.Courier.Core.Exceptions.RetrieveException: Error retrieving item [0d825241-1fb1-4945-bab3-bd0637a5dc39] from provider [e0472594-e73b-11df-9492-0800200c9a66]. ---> System.InvalidOperationException: A call to SetSessionId must occur before getting/setting a session or transaction at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateGlobalSessionManager.get_ThreadSession() at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateSessionManagerBase.GetSession(IInterceptor interceptor) at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateGlobalSessionManager.GetSession() at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateProvider.GetCurrentSession() at Umbraco.Courier.Persistence.V6.NHibernate.Persisters.NHibernateItemCrud1.GetCurrentSession() at Umbraco.Courier.Persistence.V6.NHibernate.Persisters.ContentPropertyDataItem.RetrieveItem(ItemIdentifier itemId) at Umbraco.Courier.Core.ItemCrud1.RetrieveItem[T1](ItemIdentifier itemId) at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId) --- End of inner exception stack trace --- at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId) at Umbraco.Courier.ItemProviders.PropertyItemProvider.HandlePack(ItemIdentifier id) at Umbraco.Courier.Core.ItemProvider.Package(ItemIdentifier id) at Umbraco.Courier.RepositoryProviders.Local.Package(ItemIdentifier itemId) at Umbraco.Courier.RepositoryProviders.Local.Hash(ItemIdentifier itemId) at Umbraco.Courier.RepositoryProviders.Webservices.Repository.GetItemHash(String sessionKey, ItemIdentifier itemId, String user, String pass) --- End of inner exception stack trace ---

    Exception Type: System.Web.Services.Protocols.SoapException

    Stack Trace: at Concorde.CacheHandler.UI.Controllers.DeployController.GetProcessedTask(Guid id) at Concorde.CacheHandler.UI.Controllers.DeployController.GetTask(Guid id) at Concorde.CacheHandler.UI.Controllers.DeployController.CurrentTaskStatus() at lambdamethod(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass10.9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker._1.MoveNext()

    • Mathias
  • Mathias Poulsen 18 posts 139 karma points
    Mar 10, 2016 @ 13:10
    Mathias Poulsen
    0

    This just happened again, but with a JPG file.

  • Mathias Poulsen 18 posts 139 karma points
    Mar 10, 2016 @ 13:18
    Mathias Poulsen
    0

    Just a though on this topic, would it be an idea to implement some sort of continuos process, so you dont have to start over packaging from the beginning?

    Even when it finally created the package, but something went wrong during the deployment to the target site, you have to start all over again instead of just reusing the package..

  • Gleb Kaplan 49 posts 125 karma points
    Apr 29, 2016 @ 14:22
    Gleb Kaplan
    0

    The same issue occurs periodically during couriering.

    On target:

    2016-04-29 15:04:18,113 [74] ERROR Umbraco.Courier.Core.Diagnostics.Logging.RevisionLog - [Thread 66] [Error]; Item Id: 22d48523-ab01-4d06-828e-92107f4ef46c; Caller: Umbraco.Courier.Persistence.V6.NHibernate.NHibernateProvider; Process: PersistenceManager; Msg: Could not retrieve item: 
    
     System.InvalidOperationException: A call to SetSessionId must occur before getting/setting a session or transaction
       at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateGlobalSessionManager.get_ThreadSession()
       at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateSessionManagerBase.GetSession(IInterceptor interceptor)
       at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateGlobalSessionManager.GetSession()
       at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateProvider.GetCurrentSession()
       at Umbraco.Courier.Persistence.V6.NHibernate.Persisters.MediaItem.RetrieveItem(ItemIdentifier itemId)
       at Umbraco.Courier.Core.ItemCrud`1.RetrieveItem[T1](ItemIdentifier itemId)
       at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId);
    System.Exception: Error logged
    2016-04-29 15:04:18,113 [74] ERROR Umbraco.Courier.Core.ItemCrudProvider - [Thread 66] An error occurred in RetrieveItem<T>
    System.InvalidOperationException: A call to SetSessionId must occur before getting/setting a session or transaction
       at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateGlobalSessionManager.get_ThreadSession()
       at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateSessionManagerBase.GetSession(IInterceptor interceptor)
       at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateGlobalSessionManager.GetSession()
       at Umbraco.Courier.Persistence.V6.NHibernate.NHibernateProvider.GetCurrentSession()
       at Umbraco.Courier.Persistence.V6.NHibernate.Persisters.MediaItem.RetrieveItem(ItemIdentifier itemId)
       at Umbraco.Courier.Core.ItemCrud`1.RetrieveItem[T1](ItemIdentifier itemId)
       at Umbraco.Courier.Core.ItemCrudProvider.RetrieveItem[T](ItemIdentifier itemId)
    

    On source:

    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Transaction not successfully started
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    

    The only workaround is to recycle app pool or restart appdomain on the target machine.

    Umbraco 7.3.4, Courier 2.51.4

Please Sign in or register to post replies

Write your reply to:

Draft