ATG Repository – Table Ownership issue

You may have come across the error as below while starting the atg dynamo server, even though all the tables are physically present in the database.

Table 'DCS_PRODUCT' in item-descriptor: 'product' does not exist in a table space accessible by the data source. DatabaseMetaData.getColumns returns no columns. Catalog=null Schema=CATALOG1USER.

Unknown JDBC types for property: parentCategories, item-type: product. Check that the column names in the database and template match. The column CATEGORY_ID was not found in the set of columns returned by the database: {} for this table.

Table 'DCSPRDKEYWRDS' in item-descriptor: 'product' does not exist in a table space accessible by the data source. DatabaseMetaData.getColumns returns no columns. Catalog=null Schema=CATALOG1USER.

Table 'DCSPRDMEDIA' in item-descriptor: 'product' does not exist in a table space accessible by the data source. DatabaseMetaData.getColumns returns no columns. Catalog=null Schema=CATALOG1USER.

This error occurred because the actual owner of the schema or table and the username configured in oracle-ds.xml for the respective schema are different.

If you execute the below query in the respective schema, you will get to know the actual owner of the schema

select * from all_tables where table_name='DCS_PRODUCT'

Result : CATALOG1

In our case actual owner is CATALOG1 but in oracle-ds.xml configured user is CATALOG1USER. Mostly the credentials of actual owner of the schema are not revealed.

This can be easily resolved by adding the below two properties in the respective repository configuration file.

For ex: DCS_PRODUCT is part of ProductCatalog Repository. So we need to add these properties in /atg/commerce/catalog/ProductCatalog.properties