Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.
Endpoint Virtualization Community Blog

Solving Inventory Problems with NS Delivered SVS Applications

Created: 22 Dec 2005 • Updated: 29 Jul 2010
BBishop's picture
0 0 Votes
Login to vote

Technical wizard Brent Bishop sheds some light on an inventory problem caused by invalid characters in application layer names. The juicy truth is that SVS is still being tuned to speak perfect XML -- the language spoken by the inventory engine in Notification Server.

The Issue

Here's a problem that raises its ugly head when a Software Virtualization layer inventory does not appear in Notification Server (or does not appear to be complete).

The Details

As layers are imported into SVS on a NS Agent machine, application information is inventoried to the NS server that the NS agent reports to. There is currently an issue with missing or incomplete inventories being reported to the Notification Server.

The Cause and Resolution

SVS does not properly escape some characters for XML. So if the following characters are used in the name of an SVS layer, the layer inventory data becomes inaccurate or missing.

quote (")
apostrophe (')
ampersand (&)
less than (<)
greater than (>)

Here's what happens. NS loads the rows of data in the inventory message it receives from SVS (sent via the NS agent) until it gets to one of these unescaped characters. NS then stops loading the inventory message and places it in the \bad\AeXException folder under one of the EvtQueue directories (depending on the size of the file). The NS log then includes messages similiar to the following:

Source: Altiris.NS.ClientMessaging.FileDispatcher.ProcessFileCallback
Description: An XmlException occured while processing the message C:\ns 6 sp2\Notification Server\NSCap\EvtQueue\Process\nseC4.tmp. Replacing invalid characters and re-processing.

Source: Altiris.NS.ClientMessaging.FileDispatcher.ProcessFileCallback
Description: Unable to process the file "C:\ns 6 sp2\Notification Server\NSCap\EvtQueue\Process\nseC4.tmp" Moving to "C:\ns 6 sp2\Notification Server\NSCap\EvtQueue\Bad\AeXException\nseC5.tmp". Reason: Failed to process NSE System.Xml.XmlException: An error occurred while parsing EntityName. Line 52, position 33.

The directories and location of the error (line and position number) are different but the effect is the same.

The overall problem is caused by a lack of XML escaping by the SVS agent. This issue is logged as an enhancement request with the SVS team.

Additonal Details

The inventory message is similar to the following. Errors are in the data of the <row... tags between the <data> and </data> tags as below:

<?xml version='1.0' ?>
<WbemEventObject class='CE_NfySvrRemoteEvent'>
  <Resource guid='{05CA68AA-CE08-430E-A916-93781D0F04A6}'typeGuid='493435F7-3B17-4C4C-B07F-C23E7AB7781F'>
    <Attribute name='Domain' value='WORKGROUP'/>
    <Attribute name='Name' value='ALTIRIS-5TE170Z'/>
    <Attribute name='Altkey1' value=''/>
    <Attribute name='Altkey2' value='00-0C-76-09-70-D4'/>
    <from><resource typeGuid="493435F7-3B17-4C4C-B07F-C23E7AB7781F" guid="05CA68AA-CE08-430E-A916-93781D0F04A6" /></from>
        <dataClass guid="A8F3A5C2-86D7-46CC-9434-3F4D4C16DD6B">
              <row  c0="c081a0b2-54c6-4980-b736-a1833f391c07" c1="IExplorer & ILink" c2="Active" c3="Application" c4="2.0" c5="2005-11-15 11:02:29" c6="2005-11-21 12:24:53" c7="" /> 
              <row c0="c94ac6c4-5ef1-4513-a8fc-b48600d9f2ae" c1="calc" c2="Inactive" c3="Application" c4="2.0" c5="2005-11-17 12:26:59" c6="2005-11-21 12:26:16" c7="" />

Note: The error above is in the first row where it says - c1="IExplorer & ILink". Properly done this would read c1="IExplorer &amp; ILink".

The proper replacements for the invalid XML characters are:

Unescaped Character Escaped Character in XML
quote (") &quot;
apostrophe (') &apos;
ampersand (&) &amp;
less than (<) &lt;
greater than (>) &gt;
slash (\) No escape required
space No escape required