Inventory Policies and Tasks fail to load: A critical error has occurred on this page. Check the Altiris Logs for more details
search cancel

Inventory Policies and Tasks fail to load: A critical error has occurred on this page. Check the Altiris Logs for more details

book

Article ID: 160943

calendar_today

Updated On:

Products

Inventory Solution

Issue/Introduction

Inventory Policies and Tasks fail to load: A critical error has occurred on this page. Check the Altiris Logs for more details.

Unhandled exception.
System.Data.SqlClient.SqlException (.Net SqlClient Data Provider): The error description is 'Element was not closed.'.
Could not find prepared statement with handle 0.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at Altiris.NS.DataAccessLayer.Implementation.Altiris_Inventory_DALInvDataAccess.getTaskXMLDefaultFolders(String platform)
at Altiris.Inventory.Utilities.InvTaskXML.get_InventoryTask_DriversFoldersDefaultXML()
at Altiris.Inventory.InventoryTaskEditControl.SetInitialValues()
at System.Web.UI.Control.OnLoad(EventArgs e)
at Altiris.Inventory.InventoryTaskEditControl.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

SQL Exception details: code=6602, line=1, procedure=sp_xml_preparedocument

Exception logged from:
at Altiris.Diagnostics.Logging.EventLog.ReportException(Int32 severity, String strMessage, String category, Exception exception, String footer)
at Altiris.NS.Logging.EventLog.ReportException(Int32 severity, String strMessage, String category, Exception exception)
at Altiris.NS.UI.AltirisWebApplication.Application_Error(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.HttpApplication.RaiseOnError()
at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.ResumeStepsFromThreadPoolThread(Exception error)
at System.Web.HttpApplication.AsyncEventExecutionStep.ResumeStepsWithAssert(Exception error)
at System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar)
at System.Web.HttpAsyncResult.Complete(Boolean synchronous, Object result, Exception error, RequestNotificationStatus status)
at System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._TimerCallback.PerformTimerCallback(Object state)

Environment

ITMS 8.x

Cause

This is a known issue relating to the Software Library.

Resolution

The error stems from the File scan rules that are part of the policy. Part of loading the page involves enumerating the folder exclusions, including the Software Library location. While the cause is unknown, the library location gets into a state where the SQL throws the errors shown in the log when the problem occurs.

To resolve the issue, go to Settings > All Settings > Software > Software Catalog and Library Settings > select Software Library Configuration. Click on Validate, and then click Save changes. This should resolve the issue.