<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Postgres SQL schema name inconsistency in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/postgres-sql-schema-name-inconsistency/m-p/180350#M133480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In addition to the above remark, in encountered what looks like a bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After resolving the upper , lower case problems the isTablePresent method still returns false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As a result i still get the exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason why this fails lies in the parameters passed to the &amp;lt;code&amp;gt;databaseMetaData.getTables&amp;lt;/code&amp;gt; method in the code below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt; if ("postgres".equals(databaseType)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName = tableName.toLowerCase();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables = databaseMetaData.getTables(catalog, schema, tableName, JDBC_METADATA_TABLE_TYPES);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return tables.next();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } finally {&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The schema name is not passed. The tablename is the concatenation between schema and tablename. The tables are found when i pass the real tablename as a parameter in debugging mode. When i set the schema to the actual schema, instead of null as is now the case, then the tables are still found. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So to summarize:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;databaseMetaData.getTables(null, null, "myschema.act_ru_execution", JDBC_METADATA_TABLE_TYPES)&amp;lt;/code&amp;gt; finds nothing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;databaseMetaData.getTables(null, null, "act_ru_execution", JDBC_METADATA_TABLE_TYPES)&amp;lt;/code&amp;gt; does find the table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;databaseMetaData.getTables(null, "myschema", "act_ru_execution", JDBC_METADATA_TABLE_TYPES)&amp;lt;/code&amp;gt; does find the table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So i think i'll return to an in-memory database for a while… &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Sep 2014 07:10:42 GMT</pubDate>
    <dc:creator>deg</dc:creator>
    <dc:date>2014-09-25T07:10:42Z</dc:date>
    <item>
      <title>Postgres SQL schema name inconsistency</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/postgres-sql-schema-name-inconsistency/m-p/180349#M133479</link>
      <description>My dev evironment uses activiti 5.16.3 on a PostGreSQL 9.3My aciviti tables need to run in a seperate schema.I lost some time due to the fact that i gave the schema an name in uppercase. Activiti always converts the entire tablename, incuding the database schema prefix, to lowercase when trying to c</description>
      <pubDate>Wed, 24 Sep 2014 13:37:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/postgres-sql-schema-name-inconsistency/m-p/180349#M133479</guid>
      <dc:creator>deg</dc:creator>
      <dc:date>2014-09-24T13:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres SQL schema name inconsistency</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/postgres-sql-schema-name-inconsistency/m-p/180350#M133480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In addition to the above remark, in encountered what looks like a bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After resolving the upper , lower case problems the isTablePresent method still returns false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As a result i still get the exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason why this fails lies in the parameters passed to the &amp;lt;code&amp;gt;databaseMetaData.getTables&amp;lt;/code&amp;gt; method in the code below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt; if ("postgres".equals(databaseType)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableName = tableName.toLowerCase();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables = databaseMetaData.getTables(catalog, schema, tableName, JDBC_METADATA_TABLE_TYPES);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return tables.next();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } finally {&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The schema name is not passed. The tablename is the concatenation between schema and tablename. The tables are found when i pass the real tablename as a parameter in debugging mode. When i set the schema to the actual schema, instead of null as is now the case, then the tables are still found. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So to summarize:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;databaseMetaData.getTables(null, null, "myschema.act_ru_execution", JDBC_METADATA_TABLE_TYPES)&amp;lt;/code&amp;gt; finds nothing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;databaseMetaData.getTables(null, null, "act_ru_execution", JDBC_METADATA_TABLE_TYPES)&amp;lt;/code&amp;gt; does find the table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;databaseMetaData.getTables(null, "myschema", "act_ru_execution", JDBC_METADATA_TABLE_TYPES)&amp;lt;/code&amp;gt; does find the table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So i think i'll return to an in-memory database for a while… &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 07:10:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/postgres-sql-schema-name-inconsistency/m-p/180350#M133480</guid>
      <dc:creator>deg</dc:creator>
      <dc:date>2014-09-25T07:10:42Z</dc:date>
    </item>
  </channel>
</rss>

