Skip to main content
nick.vigilante
New Participant
February 28, 2017

KB-1150 "The rule contains an expression that cannot be tested" error thrown when using xpathsnippet() function

Symptoms

An xpathsnippet() expression with valid inputs fails to save or execute with the following error on the interface:

The rule contains an expression that cannot be tested

The corresponding error in the application-server log is as follows:

INFO  [stdout] (ajp-/0.0.0.0:8009-4) com.appiancorp.process.expression.ExpressionRuntimeException$AppianExceptionProvider: Expression evaluation error at function 'xpathsnippet': Error evaluating function 'xpathsnippet' : 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.
...

Cause

The application server’s –Dfile.encoding property is not set to UTF-8 and is therefore unable to parse the XML input correctly.

Action

To resolve this issue, set the value of –Dfile.encoding to UTF-8 in standalone.custom.(bat|sh) and restart JBoss.

Affected Versions

This article applies to all versions of Appian using JBoss EAP as an application server.

Last Reviewed: February 2017