The following errors appear in the log when processing inventories.
Source: Altiris.NS.ResourceManagement.DataClassImporter.LoadInventory_Impl
Description: Failed to load inventory. ['?', hexadecimal value 0x03, is an invalid character. Line 2421, position 62.]
--------------------
Source: Altiris.NS.StandardItems.Messaging.InventoryCaptureItem.OnMessage_Impl
Description: Failed to process NSE : ( Unhandled exception. Type=Altiris.NS.Exceptions.AeXException Msg=Failed to load inventory. ['?', hexadecimal value 0x03, is an invalid character. Line 2421, position 62.] Src=Altiris.NS
StackTrace=
at Altiris.NS.ResourceManagement.DataClassImporter.LoadInventory_Impl(XmlReader reader, Boolean bProcessData, Boolean bForceSchemaValidation, Guid resourceGuidOverride)
at Altiris.NS.ResourceManagement.DataClassImporter.LoadInventory(XmlReader reader, Boolean bProcessData, Boolean bForceSchemaValidation, Guid resourceGuidOverride)
at Altiris.NS.ResourceManagement.DataClassImporter.LoadInventory(Guid resourceGuid, XmlReader reader)
at Altiris.NS.StandardItems.Messaging.InventoryCaptureItem.OnMessage_Impl(String message, Boolean useFilename)
Inner exception. Type=System.Xml.XmlException Msg='?', hexadecimal value 0x03, is an invalid character. Line 2421, position 62. Src=System.Xml StackTrace= at System.Xml.XmlScanner.ScanLiteral()
--------------------
Source: Altiris.NS.LegacyInterop.ItemMessageDispatcherService.Dispatch
Description: ItemMessageDispatcherService::Dispatch ( Unhandled exception. Type=Altiris.NS.Exceptions.AeXException Msg=Failed to load inventory. ['?', hexadecimal value 0x03, is an invalid character. Line 2421, position 62.] Src=Altiris.NS
StackTrace=
at Altiris.NS.LegacyInterop.ItemMessageDispatcherService.Dispatch(String message, Boolean useFilename)
Inner exception. Type=System.Xml.XmlException Msg='?', hexadecimal value 0x03, is an invalid character. Line 2421, position 62. Src=System.Xml StackTrace= at System.Xml.XmlScanner.ScanLiteral()
--------------------
Source: Altiris.NS.ClientMessaging.FileDispatcher.ProcessFileCallback
Description: An XmlException occured while processing the message D:\Program Files\Altiris\Notification Server\NSCap\EvtQueue\Process\nseD638.tmp. Replacing invalid characters and re-processing.
--------------------
Source: Altiris.NS.ClientMessaging.FileDispatcher.ProcessFileCallback
Description: 1 invalid characters were replaced with the ? character.
--------------------
Failed to load inventory. ' ', hexadecimal value 0x01, is an invalid character.
--------------------
NSE dispatch failed for: id=43522938, from: xxxxxxxx, to: 'Basic Inventory Capture Item'
The cause for this is simple there is a character in an XML file that we are not able to process. This can be because it is a reserved character for XML, it is a corrupt character that cannot be read or it could be a space in a location that causes the XML to look invalid.
Most frequently this happens when inventories are being processed because files or data that are coming in have reserved XML characters as part of the data section causing the XML parser to fail to read the file. Custom inventories are usually the main culprit, usually, a custom dataclass is collecting data from a field that has an invalid character.
This warning message does not indicate a problem with the Notification Server or Altiris Agent. Because Notification Server is designed to replace the invalid characters with a ? and then process the file again, there is rarely a problem with the file being processed.
In case you want to identify what could be causing the issue, like a custom dataclass:
1. Capture the NSEs coming to the SMP server.
In the registry under 'HKLM\SOFTWARE\Altiris\eXpress\Notification Server' create a string value named EventCopyFolder. The path specified in EventCopyFolder is the location where all NSEs will be copied during processing. Ensure the corresponding destination folder has also been created on the file system.
Caution! On a busy SMP Server, the number of events processed per day can be well above 10,000 (on large production systems daily load can be upward of 300,000 events) so make sure that the destination folder can hold the events for the period of the capture. Also, ensure that the capture will not interfere with the standard processing of events (creating disk contention or similar problems) and impact the overall system performance.
2. After capturing the NSEs with the invalid character, try to identify which dataclass stores the information sent by the client machine(s). Also, look to see if the NSEs with the invalid character are coming from certain machines.
You can use SSETools "NSE diagnostics", which can help you to see the NSE type (displayed under Scenario Counts) and from what machines (under Resource counts).
Just change the "Folder" location to the one that you are referencing on the "EventCopyFolder" regkey that you created to contain the captured NSEs.
3. Then, you can match the GUID of the NSE with the one from the error message. For example, in this one:
NSE dispatch failed for: id=43444414, from: 92C2D52C-39A8-4D01-8AFB-F74D64D2AFB8, to: 'Basic Inventory Capture Item' (1592b913-72f3-4c36-91d2-d4eda21d2f96)
Failed to load inventory.
[Altiris.NS.Exceptions.AeXException @ Altiris.NS]
at Altiris.NS.ResourceManagement.DataClassImporter.LoadInventory(XmlReader reader, Boolean processData, Boolean forceSchemaValidation, Guid resourceGuidOverride)
at Altiris.NS.StandardItems.Messaging.InventoryCaptureItem.ImportDataClassNode(MessagingResource fromResource, XmlTextReader xmlReader, ResourceImporter resourceImporter, DataClassImporter inventoryImporter)
at Altiris.NS.StandardItems.Messaging.InventoryCaptureItem.ImportDataClassData(MessagingResource fromResource, XmlTextReader xmlReader, ResourceImporter resourceImporter)
at Altiris.NS.StandardItems.Messaging.InventoryCaptureItem.OnMessageImpl(String message, Boolean useFilename)
at Altiris.NS.StandardItems.Messaging.InventoryCaptureItem.OnMessageInternal(String message, Boolean useFilename)
at Altiris.NS.ClientMessaging.EventQueueDispatcher.DispatchWithinContext(String message, Boolean useFilename, IItem item, IItemMessaging iim, MessageHeader header)
at Altiris.NS.ClientMessaging.EventQueueDispatcher.DispatchWithinContext(Int32 eventQueueId, String message, Boolean useFilename, Int64 fileSize, Int64 eventId, MessageHeader header)
at Altiris.NS.ClientMessaging.EventQueueDispatcher.TryDispatch(Int32 eventQueueId, String message, Boolean useFilename, Int64 fileSize, Int64 eventId)
'', hexadecimal value 0x02, is an invalid character. Line 23, position 73.
"92C2D52C-39A8-4D01-8AFB-F74D64D2AFB8" is the GUID of the machine. Under the NSE Diagnostics window, check under the "Resources counts" section and find the mentioned GUID. After finding it, double-click on it, and under the "Message List" frame, all the NSEs that came from that GUID will be displayed.
4. After finding the NSEs that came from that machine, try to match the "Modified" time with the time stamp from the message in the NS log. Then double-click on the NSE file and it will open a new window with the content of that NSE.
For this example, this is how the bad NSE looked like:
<?xml version="1.0"?>
<message>
<to>{1592B913-72F3-4C36-91D2-D4EDA21D2F96}</to>
<priority>1</priority>
<msgId>{702C8CAA-8AE4-4CC4-9D5F-0CC5CDC12ECF}</msgId>
<time>20211220100658.575000+300</time>
<from>
<resource typeGuid="{493435F7-3B17-4C4C-B07F-C23E7AB7781F}" guid="{92C2D52C-39A8-4D01-8AFB-F74D64D2AFB8}" name="RO-Machine10">
<key name="fqdn" value="RO-Machine10.domain.com"/>
<key name="name.domain" value="RO-Machine10.domain"/>
<key name="name.domain" value="RO-Machine10.domain.com"/>
<key name="uniqueid" value="539D0DCF-0DA3-7949-7128-CDC96DDBBC"/>
<key name="uniqueid" value="aWQOg4/pwahH4DjSDaHFwg=="/>
<key name="uniqueid" value="bcdo0EbZ6KMXGFsnkI3GAg=="/>
<key name="uniqueid" value="H/aIzm9DRvNs4F1NtjjZBQ=="/>
<key name="uniqueid" value="jk5SlmjoslXIESPo/gJJ3w=="/>
<key name="uniqueid" value="prDV4AWh90V+dgSpYMvEdA=="/>
<key name="uniqueid" value="psNE8R+krXSZa0q7C3hqoA=="/>
</resource>
</from>
<body>
<inventory>
<dataClass guid="{d1e49f43-31a1-45b2-bed6-beaad85d9e6f}">
<data>
<resource partialUpdate="false">
<row c0="1" c1="1" c2="1" c3="1398033696" c4="1.258.0.0" c5=" " c6="1.3" c7="2.0, 0, 1.38" hash="B94RY8vIXfwZt/2TbiNQJA=="/>
</resource>
</data>
</dataClass>
</inventory>
</body>
</message>
The NSE should show you which machine it comes from:
name="RO-Machine10"
What dataclass is coming from:
<dataClass guid="{d1e49f43-31a1-45b2-bed6-beaad85d9e6f}">
and what field is the one having the invalid character:
c5=" "
5. Find the dataclass name associated with the dataclass GUID. You can use the following link on your SMP Console and just replace the "ItemGuid" with the dataclass guid that you are trying to find:
https://smp.domain.com/Altiris/NS/ItemPropertiesNS7.aspx?ItemGuid=28cc7402-0a7f-40b8-acf9-73db2ad654de&view=properties&ConsoleGuid={3faa8b67-250b-42ad-8186-fe2f49a9e707}
It should return a page like this:
6. In this example, the affected dataclass is called "Win32_Tpm". This is a custom inventory dataclass. If you open "Resource Manager" for that client machine, if you go under View>Inventory, you should be able to find the dataclass and confirm what field name is the one with invalid characters. In this example, it is called "ManufacturerVersionInfo"
7. From here, you can either edit the custom dataclass and delete the affected field, disable the inventory policy that is calling out to collect the data for this dataclass, or just ignore the error messages now knowing what is causing it.
161232 "Message dispatch is failing with : "Failed to load inventory. '', hexadecimal value 0x01, is an invalid character. Line XXXX, position XXX.""