1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Server Error encountered while creating Blog post

Server Error encountered while creating Blog post

6 posts, 0 answered
  1. andersleet
    andersleet avatar
    155 posts
    Registered:
    03 Jun 2009
    18 Jun 2009
    Link to this post
    I am testing out the system on my local machine. I created a blog, and then went to create a test post and got this error:

    An object with the same primary key already exists in the cache.

    Description:An unhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about the error andwhere it originated in the code.

    Exception Details:Nolics.ORMapper.Base.NolnetException: An object with the same primary keyalready exists in the cache.


    I am stumped since this I just created a blog and just tried to post to it, so logically this shouldn't happen right?
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    18 Jun 2009
    Link to this post
    Hello Andersleet,

    This should not happen indeed.
    Could you please paste your Sitefinity.log file in this thread? It should contain some more information about the problem. You might find the log file in the App_Data directory.

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. andersleet
    andersleet avatar
    155 posts
    Registered:
    03 Jun 2009
    18 Jun 2009
    Link to this post
    6/18/2009 8:39:33 AM [UNKNOWN]
    ************************************************************************************
    ID: 879b045e-f4c5-4ded-9057-ab96befcdd7b; Code: 3005; Occurrence: 1; Sequence: 31
    ------------------------------------------------------------------------------------

    Application information:
    Machine name: PROGRAM003
    OS Version: Microsoft Windows NT 6.0.6002 Service Pack 2
    Product Version: 3.6.1936.3
    Application Path: C:\Program Files\telerik\Sitefinity3.6 Community\WebSites\Themed\
    Debug: True

    Process information:
    Process ID: 4624
    Process Name: w3wp

    Request information:
    Request URL: /themed/sitefinity/admin/Modules.aspx?module=Blogs&route=BlogsControlPanel.PostsView.PostNewView&ParentId=c8c9a55e-5a58-4b3d-af4e-7375009f0ffe&Param=00000000-0000-0000-0000-000000000000
    Rewrite URL: http://localhost/themed/sitefinity/admin/Modules.aspx?module=Blogs&route=BlogsControlPanel.PostsView.PostNewView&ParentId=c8c9a55e-5a58-4b3d-af4e-7375009f0ffe&Param=00000000-0000-0000-0000-000000000000
    Url Referrer: http://localhost/themed/sitefinity/admin/Modules.aspx?module=Blogs&route=BlogsControlPanel.PostsView.PostNewView&ParentId=c8c9a55e-5a58-4b3d-af4e-7375009f0ffe&Param=00000000-0000-0000-0000-000000000000
    Is Authenticated: True
    Authentication Type: Forms
    User: admin
    User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729)
    User Address: 127.0.0.1

    Variables:
    AspSession: System.Web.SessionState.HttpSessionState
    RadControlRandomNumber: 0
    AspSessionIDManagerInitializeRequestCalled: True
    CmsHttpRequest: /themed/sitefinity/admin/Modules.aspx?module=Blogs&route=BlogsControlPanel.PostsView.PostNewView&ParentId=c8c9a55e-5a58-4b3d-af4e-7375009f0ffe&Param=00000000-0000-0000-0000-000000000000

    - L0 -------------------------------------------------------------------------------

    Exception Type: Nolics.ORMapper.Base.NolnetException

    Message: An object with the same primary key already exists in the cache.

    Source: Nolics.Engine.v4.2

    Stack Trace: 
       at Nolics.ORMapper.Base.OdbClassHelper.CreateClass(IOdbClass cl, Transaction tran, OdbDataProvider provider, ObDataCache cache, OdbObjectStates& state, OdbDataProvider& curProvider, ObDataCache& curCache)
       at Telerik.Cms.Engine.Data.TaggedContent.Create(Transaction tran, OdbDataProvider provider, ObDataCache cache)
       at Telerik.Cms.Engine.Data.Providers.DefaultProvider.TagContent(Guid contentId, List`1 tagNames, String owner)
       at Telerik.Cms.Engine.Data.Providers.DefaultProvider.TagContent(Guid contentId, List`1 tags)
       at Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.SaveContent()
       at Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.Button_Command(Object sender, CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    ------------------------------------------------------------------------------------



    6/18/2009 8:39:50 AM [UNKNOWN]
    ************************************************************************************
    ID: 67fefa57-01f3-4cbc-b7a6-2e6dddab0a3c; Code: 3005; Occurrence: 2; Sequence: 33
    ------------------------------------------------------------------------------------

    Application information:
    Machine name: PROGRAM003
    OS Version: Microsoft Windows NT 6.0.6002 Service Pack 2
    Product Version: 3.6.1936.3
    Application Path: C:\Program Files\telerik\Sitefinity3.6 Community\WebSites\Themed\
    Debug: True

    Process information:
    Process ID: 4624
    Process Name: w3wp

    Request information:
    Request URL: /themed/sitefinity/admin/Modules.aspx?module=Blogs&route=BlogsControlPanel.PostsView.PostNewView&ParentId=c8c9a55e-5a58-4b3d-af4e-7375009f0ffe&Param=00000000-0000-0000-0000-000000000000
    Rewrite URL: http://localhost/themed/sitefinity/admin/Modules.aspx?module=Blogs&route=BlogsControlPanel.PostsView.PostNewView&ParentId=c8c9a55e-5a58-4b3d-af4e-7375009f0ffe&Param=00000000-0000-0000-0000-000000000000
    Url Referrer: http://localhost/themed/sitefinity/admin/Modules.aspx?module=Blogs&route=BlogsControlPanel.PostsView.PostNewView&ParentId=c8c9a55e-5a58-4b3d-af4e-7375009f0ffe&Param=00000000-0000-0000-0000-000000000000
    Is Authenticated: True
    Authentication Type: Forms
    User: admin
    User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729)
    User Address: 127.0.0.1

    Variables:
    AspSession: System.Web.SessionState.HttpSessionState
    RadControlRandomNumber: 0
    AspSessionIDManagerInitializeRequestCalled: True
    CmsHttpRequest: /themed/sitefinity/admin/Modules.aspx?module=Blogs&route=BlogsControlPanel.PostsView.PostNewView&ParentId=c8c9a55e-5a58-4b3d-af4e-7375009f0ffe&Param=00000000-0000-0000-0000-000000000000

    - L0 -------------------------------------------------------------------------------

    Exception Type: Nolics.ORMapper.Base.NolnetException

    Message: An object with the same primary key already exists in the cache.

    Source: Nolics.Engine.v4.2

    Stack Trace: 
       at Nolics.ORMapper.Base.OdbClassHelper.CreateClass(IOdbClass cl, Transaction tran, OdbDataProvider provider, ObDataCache cache, OdbObjectStates& state, OdbDataProvider& curProvider, ObDataCache& curCache)
       at Telerik.Cms.Engine.Data.TaggedContent.Create(Transaction tran, OdbDataProvider provider, ObDataCache cache)
       at Telerik.Cms.Engine.Data.Providers.DefaultProvider.TagContent(Guid contentId, List`1 tagNames, String owner)
       at Telerik.Cms.Engine.Data.Providers.DefaultProvider.TagContent(Guid contentId, List`1 tags)
       at Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.SaveContent()
       at Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.Button_Command(Object sender, CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    ------------------------------------------------------------------------------------
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    18 Jun 2009
    Link to this post
    Hi,

    Thank to your log files, we were able to reproduce the problem but with custom code only. We were not able to reproduce it in any way using the user interface.
    Could you please let us know the following:
    1. Did you use the user interface for creating of the content?
    2. What were the exact steps?
    3. Did you have the tags you used defined before you created the blog post?

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. andersleet
    andersleet avatar
    155 posts
    Registered:
    03 Jun 2009
    18 Jun 2009
    Link to this post
    1. Yes, I used the administrative panel to create the blog and the post
    2. I created the blog, then created a post. when i got to tags, i added a new one then clicked the X on its icon, then typed in the same tag name again (I used 'new'), then tried to save it
    3. No, I created it as I created the post.


    It should be noted that i tried creating a second post and it worked fine. I wonder if it was the tag cancelling/recreating thing I did?
  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    18 Jun 2009
    Link to this post
    Hi,

    Thank you for the clarification. We were able to reproduce this with the UI as well. The problem is that the delete button of the tag does not actually the delete the tag from the collection which is submitted to the provider. So, if you delete a tag and add the same tag again, it will exists two times in the collection and the error will be raised when you try to save the post.

    We have this fixed now - you will be able to get the fix with the next service pack.

    You account has been updated with some points.

    I hope that it is clear for you as well in which cases you will reproduce it. Please avoid them until SP3 comes out.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
6 posts, 0 answered