<?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-1068 "Error executing SQL update... java.sql.SQLException: You can't specify target table 'X' for update in FROM clause" error thrown during application server startup</title><link>https://community.appian.com/support/w/kb/293/kb-1068-error-executing-sql-update-java-sql-sqlexception-you-can-t-specify-target-table-x-for-update-in-from-clause-error-thrown-during-application-server-startup</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-1068 "Error executing SQL update... java.sql.SQLException: You can't specify target table 'X' for update in FROM clause" error thrown during application server startup</title><link>https://community.appian.com/support/w/kb/293/kb-1068-error-executing-sql-update-java-sql-sqlexception-you-can-t-specify-target-table-x-for-update-in-from-clause-error-thrown-during-application-server-startup</link><pubDate>Mon, 30 Jul 2018 04:12:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7766bc4-6d2f-400e-b859-7d6bd499f552</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/293/kb-1068-error-executing-sql-update-java-sql-sqlexception-you-can-t-specify-target-table-x-for-update-in-from-clause-error-thrown-during-application-server-startup#comments</comments><description>Current Revision posted to Appian Knowledge Base by Parmida Borhani on 7/30/2018 4:12:19 AM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2 id="symptoms"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;Upon starting the application server after a fresh installation of Appian with MySQL as the primary database, an error similar to the following is printed to the console and written to the application server log:&lt;/p&gt;
&lt;pre&gt;ERROR liquibase - Error executing SQL UPDATE `DATABASECHANGELOG` SET `TAG` = &amp;#39;6.6.1.0&amp;#39; WHERE DATEEXECUTED = (SELECT MAX(DATEEXECUTED) FROM (SELECT DATEEXECUTED FROM `DATABASECHANGELOG`) AS X)
java.sql.SQLException: You can&amp;#39;t specify target table &amp;#39;DATABASECHANGELOG&amp;#39; for update in FROM clause
&lt;/pre&gt;
&lt;p&gt;After seeing the above error, the application server will ultimately fail to start up.&lt;/p&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;
&lt;p&gt;The particular version of MySQL hosting the primary database does not support the complex queries required for the initial configuration of the primary database.&lt;/p&gt;
&lt;h2 id="action"&gt;Action&lt;/h2&gt;
&lt;p&gt;Ensure that the version of MySQL being used is 5.6.x. Any future or prior version to that of MySQL is currently unsupported for Appian 16.1 and earlier.&lt;/p&gt;
&lt;p&gt;Alternatively, Appian 16.2 and later supports MySQL 5.7.x. Upgrade to Appian 16.2 or later if downgrading your database is not feasible.&lt;/p&gt;
&lt;p&gt;Refer to the &lt;a href="https://docs.appian.com/suite/help/latest/System_Requirements.html#Databases"&gt;System Requirements&lt;/a&gt; page for more information.&lt;/p&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 16.1 and earlier using MySQL as an RDBMS that hosts the primary database.&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, mysql, application server, infrastructure&lt;/div&gt;
</description></item><item><title>KB-1068 "Error executing SQL update... java.sql.SQLException: You can't specify target table 'X' for update in FROM clause" error thrown during application server startup</title><link>https://community.appian.com/support/w/kb/293/kb-1068-error-executing-sql-update-java-sql-sqlexception-you-can-t-specify-target-table-x-for-update-in-from-clause-error-thrown-during-application-server-startup/revision/1</link><pubDate>Tue, 21 Feb 2017 21:50:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7766bc4-6d2f-400e-b859-7d6bd499f552</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/293/kb-1068-error-executing-sql-update-java-sql-sqlexception-you-can-t-specify-target-table-x-for-update-in-from-clause-error-thrown-during-application-server-startup#comments</comments><description>Revision 1 posted to Appian Knowledge Base by Nick Vigilante on 2/21/2017 9:50:15 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2 id="symptoms"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;Upon starting the application server after a fresh installation of Appian with MySQL as the primary database, an error similar to the following is printed to the console and written to the application server log:&lt;/p&gt;
&lt;pre&gt;ERROR liquibase - Error executing SQL UPDATE `DATABASECHANGELOG` SET `TAG` = &amp;#39;6.6.1.0&amp;#39; WHERE DATEEXECUTED = (SELECT MAX(DATEEXECUTED) FROM (SELECT DATEEXECUTED FROM `DATABASECHANGELOG`) AS X)
java.sql.SQLException: You can&amp;#39;t specify target table &amp;#39;DATABASECHANGELOG&amp;#39; for update in FROM clause
&lt;/pre&gt;
&lt;p&gt;After seeing the above error, the application server will ultimately fail to start up.&lt;/p&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;
&lt;p&gt;The particular version of MySQL hosting the primary database does not support the complex queries required for the initial configuration of the primary database.&lt;/p&gt;
&lt;h2 id="action"&gt;Action&lt;/h2&gt;
&lt;p&gt;Ensure that the version of MySQL being used is 5.6.x. Any future or prior version to that of MySQL is currently unsupported for Appian 16.1 and earlier.&lt;/p&gt;
&lt;p&gt;Alternatively, Appian 16.2 and later supports MySQL 5.7.x. Upgrade to Appian 16.2 or later if downgrading your database is not feasible.&lt;/p&gt;
&lt;p&gt;Refer to the &lt;a href="https://docs.appian.com/suite/help/latest/System_Requirements.html#Databases"&gt;System Requirements&lt;/a&gt; page for more information.&lt;/p&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 16.1 and earlier using MySQL as an RDBMS that hosts the primary database.&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, mysql, application server&lt;/div&gt;
</description></item></channel></rss>