<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-1150 "The rule contains an expression that cannot be tested" error thrown when using xpathsnippet() function</title><link>https://community.appian.com/support/w/kb/369/kb-1150-the-rule-contains-an-expression-that-cannot-be-tested-error-thrown-when-using-xpathsnippet-function</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-1150 "The rule contains an expression that cannot be tested" error thrown when using xpathsnippet() function</title><link>https://community.appian.com/support/w/kb/369/kb-1150-the-rule-contains-an-expression-that-cannot-be-tested-error-thrown-when-using-xpathsnippet-function</link><pubDate>Tue, 28 Feb 2017 17:14:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:145361f8-41bd-4f76-a794-bfb247cc04a7</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/369/kb-1150-the-rule-contains-an-expression-that-cannot-be-tested-error-thrown-when-using-xpathsnippet-function#comments</comments><description>Current Revision posted to Appian Knowledge Base by Nick Vigilante on 2/28/2017 5:14:27 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2 id="symptoms"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;An &lt;code&gt;xpathsnippet()&lt;/code&gt; expression with valid inputs fails to save or execute with the following error on the interface:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The rule contains an expression that cannot be tested
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The corresponding error in the &lt;strong&gt;application-server&lt;/strong&gt; log is as follows:&lt;/p&gt;
&lt;pre&gt;INFO  [stdout] (ajp-/0.0.0.0:8009-4) com.appiancorp.process.expression.ExpressionRuntimeException$AppianExceptionProvider: Expression evaluation error at function &amp;#39;xpathsnippet&amp;#39;: Error evaluating function &amp;#39;xpathsnippet&amp;#39; : An error occurred while trying to parse the XML stream. (APNX-1-4198-000)
...
Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
...
&lt;/pre&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;
&lt;p&gt;The application server&amp;rsquo;s &lt;strong&gt;&amp;ndash;Dfile.encoding&lt;/strong&gt; property is not set to UTF-8 and is therefore unable to parse the XML input correctly.&lt;/p&gt;
&lt;h2 id="action"&gt;Action&lt;/h2&gt;
&lt;p&gt;To resolve this issue, set the value of &lt;strong&gt;&amp;ndash;Dfile.encoding&lt;/strong&gt; to UTF-8 in &lt;strong&gt;standalone.custom.(bat|sh)&lt;/strong&gt; and restart JBoss.&lt;/p&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions of Appian using JBoss EAP as an application server.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed:&amp;nbsp;February 2017&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: expression rules, interfaces, SAIL, application server, application design, jboss&lt;/div&gt;
</description></item></channel></rss>