Sitemap generator prepare statement error - General Discussions - General Discussions - Progress Community
 General Discussions

Sitemap generator prepare statement error

  • Sitemap generator prepare statement error
  •  

    We are using Sitefinity 7.3, and when we tried to generate sitemap, the following exception is raised

    Message: Telerik.OpenAccess.Exceptions.DataStoreException: Error executing query: System.Threading.ThreadAbortException: Thread was being aborted.
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
    SQL:
    SELECT a.[content_id] AS COL1, a.[description_] AS COL2, a.[html_title_] AS COL3, a.[keywords_] AS COL4, a.[app_name] AS COL5, a.[buffer_output] AS COL6, a.[build_stamp] AS COL7, a.[cache_duration] AS COL8, a.[cache_output] AS COL9, a.[cache_profile] AS COL10, a.[code_behind_type] AS COL11, a.[comments_count] AS COL12, a.[content_state] AS COL13, a.[culture] AS COL14, a.[date_created] AS COL15, a.[enable_event_validation] AS COL16, a.[enable_session_state] AS COL17, a.[enable_theming] AS COL18, a.[enable_view_state] AS COL19, a.[enable_view_state_mac] AS COL20, a.[error_page] AS COL21, a.[expiration_date] AS COL22, a.[external_page] AS COL23, a.[flags] AS COL24, a.[head_tag_content] AS COL25, a.[include_script_manger] AS COL26, a.[is_auto_created] AS COL27, a.[is_personalized] AS COL28, a.[last_control_id] AS COL29, a.[last_modified] AS COL30, a.[last_modified_by] AS COL31, a.[locked_by] AS COL32, a.[maintain_scroll] AS COL33, a.[master_page] AS COL34, a.[page_node_id] AS COL35, a.[page_node_id] AS COL36, a.[ownr] AS COL37, a.[personalization_master_id] AS COL38, a.[personalization_segment_id] AS COL39, a.[publication_date] AS COL40, a.[response_encoding] AS COL41, a.[sliding_expiration] AS COL42, a.[source_key] AS COL43, a.[status] AS COL44, a.[template_id] AS COL45, a.[theme] AS COL46, a.[trace] AS COL47, a.[trace_mode] AS COL48, a.[url_evaluation_mode] AS COL49, a.[validate_request] AS COL50, a.[vrsion] AS COL51, a.[view_state_encryption] AS COL52, a.[views_count] AS COL53, a.[visible] AS COL54, a.[votes_count] AS COL55, a.[votes_sum] AS COL56 FROM [sf_page_data] a JOIN [sf_page_node] AS b ON (a.[page_node_id] = b.[id]) WHERE a.[app_name] = ?                                       AND b.[id] = ?                                       ORDER BY COL1  System.Threading.ThreadAbortException: Thread was being aborted.
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute() ---> System.Threading.ThreadAbortException: Thread was being aborted.
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
       --- End of inner exception stack trace ---
       at OpenAccessRuntime.ExceptionWrapper.Throw()
       at OpenAccessRuntime.storagemanager.logging.LoggingStorageManager.fetchNextQueryResult(ApplicationContext context, RunningQuery runningQuery, Int32 skipAmount)
       at OpenAccessRuntime.DataObjects.ForwardQueryResult.Initialize()
       at OpenAccessRuntime.DataObjects.ForwardQueryResult.get_Item(Int32 indexParam)
       at OpenAccessRuntime.ListEnumerator.setCurrent(Int32 _pos)
       at OpenAccessRuntime.ListEnumerator.Move(Int32 relative)
       at Telerik.OpenAccess.Query.TypedEnumerator`1.MoveNext()
       at Telerik.Sitefinity.SitemapGenerator.Impl.SitemapCrawler.GetPageRels(PageNode page, ISite site)
       at Telerik.Sitefinity.SitemapGenerator.Impl.SitemapCrawler.GetPageEntries(ISite site, Int32& count, SitemapScheduledTask task)
       at Telerik.Sitefinity.SitemapGenerator.Impl.SitemapCrawler.GetEntries(Guid siteId, SitemapScheduledTask task)
       at Telerik.Sitefinity.SitemapGenerator.SitemapManager.Start(Guid siteId, SitemapScheduledTask task)

    However, if we execute manually the query with data from DB, the execution run smoothly.

     So, what can be the problem?

    And we also encounter numerous the following error, which is really strange, is it a configuration problem?

    Message: System.InvalidOperationException: Sequence contains more than one element
       at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
       at Telerik.Sitefinity.SitemapGenerator.SitemapManager.UnScheduleTask(Guid siteId)
        
        
    Message: System.InvalidOperationException: Sequence contains more than one element
       at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
       at Telerik.Sitefinity.SitemapGenerator.SitemapManager.UnScheduleTask(Guid siteId)
        
    Message : Thread was being aborted.
    Source : Unity_ILEmit_DynamicClasses
    Help link :
    ExceptionState :
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Telerik.Microsoft.Practices.Unity.InterceptionExtension.IMethodReturn <Initialize_DelegateImplementation>__60(Telerik.Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Telerik.Microsoft.Practices.Unity.InterceptionExtension.GetNextInterceptionBehaviorDelegate)
    HResult : -2146233040
    Stack Trace :    at DynamicModule.ns.Wrapped_OpenAccessBlogProvider_a417930cad05438e862c03302ac05fab.<Initialize_DelegateImplementation>__60(IMethodInvocation inputs, GetNextInterceptionBehaviorDelegate getNext)
       at Telerik.Microsoft.Practices.Unity.InterceptionExtension.PolicyInjectionBehavior.<>c__DisplayClass1.<Invoke>b__0(IMethodInvocation policyInjectionInput, GetNextHandlerDelegate policyInjectionInputGetNext)
       at DynamicModule.ns.Wrapped_OpenAccessBlogProvider_a417930cad05438e862c03302ac05fab.Initialize(String providerName, NameValueCollection config, Type managerType)
       at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager)
        
    Message: System.Threading.ThreadAbortException: Thread was being aborted.
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance[T]()
       at Telerik.Sitefinity.Data.ManagerBase`1.GetManager[T](String providerName, String transactionName)
       at Telerik.Sitefinity.SitemapGenerator.Impl.SitemapCrawler.GetBlogEntries(FluentSitefinity fluent, ISite site, Int32& count, SitemapScheduledTask task)
       at Telerik.Sitefinity.SitemapGenerator.Impl.SitemapCrawler.GetContentEntries(ISite site, Int32& count, SitemapScheduledTask task)
       at Telerik.Sitefinity.SitemapGenerator.Impl.SitemapCrawler.GetEntries(Guid siteId, SitemapScheduledTask task)
       at Telerik.Sitefinity.SitemapGenerator.SitemapManager.Start(Guid siteId, SitemapScheduledTask task)

  • How did you resolve this?

     

    I am encountering a similiar issue in 8.2

  • Hello,

    The problem based on the stack trace info is due to a broken scheduled task for sitemap generation. Delete the broken task manually form table sf_scheduled_tasks by searching for a task
    where task_name = 'Telerik.Sitefinity.SitemapGenerator.Data.SitemapScheduledTask'

    and if a result is found delete this scheduled task from the DB and attempt generating sitemap again.

    The other thing to check is if the sitemap folder is intact and there are no duplicates. Go to Administration->User Files and change the provider to System (screenshot) select XMLSitemapGeneratorLibrary and make sure for each site there is only one folder with sitemap. There must be no duplicates.

    Regards,
    Stanislav Velikov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items