<?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-1038 "Error evaluating function 'queryruleexec' : Unexpected error executing query" thrown when evaluating query rule</title><link>https://community.appian.com/support/w/kb/263/kb-1038-error-evaluating-function-queryruleexec-unexpected-error-executing-query-thrown-when-evaluating-query-rule</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-1038 "Error evaluating function 'queryruleexec' : Unexpected error executing query" thrown when evaluating query rule</title><link>https://community.appian.com/support/w/kb/263/kb-1038-error-evaluating-function-queryruleexec-unexpected-error-executing-query-thrown-when-evaluating-query-rule</link><pubDate>Tue, 13 Aug 2019 07:08:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:609037d8-168d-4dbf-b476-a2426b78f857</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/263/kb-1038-error-evaluating-function-queryruleexec-unexpected-error-executing-query-thrown-when-evaluating-query-rule#comments</comments><description>Current Revision posted to Appian Knowledge Base by Parmida Borhani on 8/13/2019 7:08:00 AM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2 id="symptoms"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;When running a query rule, users can see a vague error similar to the following:&lt;/p&gt;
&lt;pre&gt;Expression evaluation error in rule &amp;#39;&amp;lt;rule name&amp;gt;&amp;#39; at function &amp;#39;queryruleexec&amp;#39;: Error evaluating function &amp;#39;queryruleexec&amp;#39; : Unexpected error executing query (type: [&amp;lt;CDT name&amp;gt;], query: [&amp;lt;rule name&amp;gt;], order by: [[]], filters:[null])
&lt;/pre&gt;
&lt;p&gt;The error seen above in Appian generates the following error in the application server log:&lt;/p&gt;
&lt;pre&gt;ERROR org.hibernate.util.JDBCExceptionReporter - Value &amp;#39;0000-00-00&amp;#39; can not be represented as java.sql.Date
&lt;/pre&gt;
or&lt;/div&gt;
&lt;pre class="row content_container"&gt;Caused by: com.appiancorp.suiteapi.common.exceptions.AppianRuntimeException: com.appiancorp.suiteapi.common.exceptions.AppianException: Unexpected error executing query&lt;br /&gt;...&lt;br /&gt;Caused by: org.hibernate.exception.GenericJDBCException: could not execute query&lt;br /&gt;...&lt;br /&gt;Caused by: java.sql.SQLException: Value &amp;#39;0000-00-00&amp;#39; can not be represented as java.sql.Timestamp&lt;/pre&gt;
&lt;div class="row content_container"&gt;If querying a &amp;#39;Date and Time&amp;#39; field, the following error may be seen instead:&amp;nbsp;
&lt;pre&gt;ERROR org.hibernate.util.JDBCExceptionReporter - Value &amp;#39;0000-00-00 00:00:00&amp;#39; can not be represented as java.sql.Timestamp&lt;/pre&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In the database table that this query rule was querying, there was a date column that had the value 0000-00-00 in one of its rows. Such a date is outside the possible range of values for date types, and could not be displayed.&lt;/p&gt;
&lt;h2 id="action"&gt;Action&lt;/h2&gt;
&lt;p&gt;Either delete the invalid data in the table&amp;rsquo;s row, or modify it so that it is readable by Appian.&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.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed: August 2019&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: database, query rules, application design&lt;/div&gt;
</description></item><item><title>KB-1038 "Error evaluating function 'queryruleexec' : Unexpected error executing query" thrown when evaluating query rule</title><link>https://community.appian.com/support/w/kb/263/kb-1038-error-evaluating-function-queryruleexec-unexpected-error-executing-query-thrown-when-evaluating-query-rule/revision/1</link><pubDate>Tue, 14 Feb 2017 14:26:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:609037d8-168d-4dbf-b476-a2426b78f857</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/263/kb-1038-error-evaluating-function-queryruleexec-unexpected-error-executing-query-thrown-when-evaluating-query-rule#comments</comments><description>Revision 1 posted to Appian Knowledge Base by Nick Vigilante on 2/14/2017 2:26:42 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2 id="symptoms"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;When running a query rule, users can see a vague error similar to the following:&lt;/p&gt;
&lt;pre&gt;Expression evaluation error in rule &amp;#39;&amp;lt;rule name&amp;gt;&amp;#39; at function &amp;#39;queryruleexec&amp;#39;: Error evaluating function &amp;#39;queryruleexec&amp;#39; : Unexpected error executing query (type: [&amp;lt;CDT name&amp;gt;], query: [&amp;lt;rule name&amp;gt;], order by: [[]], filters:[null])
&lt;/pre&gt;
&lt;p&gt;The error seen above in Appian generated the following error in the application server log:&lt;/p&gt;
&lt;pre&gt;18:07:45,501 INFO [stdout] (ajp-/0.0.0.0:8009-5) 2015-10-15 18:07:45,501 [ajp-/0.0.0.0:8009-5] ERROR org.hibernate.util.JDBCExceptionReporter - Value &amp;#39;0000-00-00&amp;#39; can not be represented as java.sql.Date
&lt;/pre&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In the database table that this query rule was querying, there was a date column that had the value 0000-00-00 in one of its rows. Such a date is outside the possible range of values for date types, and could not be displayed.&lt;/p&gt;
&lt;h2 id="action"&gt;Action&lt;/h2&gt;
&lt;p&gt;Either delete the invalid data in the table&amp;rsquo;s row, or modify it so that it is readable by Appian.&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.&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: database, query rules, application design&lt;/div&gt;
</description></item></channel></rss>