PostGre SQL Data fetching issue

Hi All,

We have a Postgre SQL DB connected to Appian system, and we are trying to fetching the data from respective table.

i created CDT, entity mapping verified & Data store published successfully. In Rule Expression, when we tried the query entity for this DSE, we are getting below error. 

Expression evaluation error at function a!queryEntity: An error occurred while retrieving the data. Details: Unexpected error executing query (type: [AAFAssetDT2555], query: [queryentity expression], order by: [[Sort[assetpreviousstatus asc]]], filters:[null])

could you please suggest me to resolve the issue.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    kishoren0003,

    Error Message you shared doesn't have enough information to debug. Check your Tomcat Server Log for more information and share here?

    A possible reason could be your data store entity is not published properly.

  • Here the Log.... i could see below error 

    2021-09-14 12:07:30,865 [http-nio-8080-exec-18] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: relation "AAF_Asset" does not exist
    Position: 639
    2021-09-14 12:07:33,527 [http-nio-8080-exec-6] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: relation "AAF_Asset" does not exist
    Position: 639
    2021-09-14 12:18:25,250 [http-nio-8080-exec-18] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: relation "AAF_Asset" does not exist
    Position: 639
    2021-09-14 12:20:08,730 [http-nio-8080-exec-57] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: relation "AAF_Asset" does not exist
    Position: 639
    2021-09-14 12:34:50,416 [http-nio-8080-exec-42] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: relation "AAF_Asset" does not exist
    Position: 639
    2021-09-14 13:04:43,227 [Timer-4] INFO com.appiancorp.cache.DatabaseAuxiliaryCache - Removing expired entries from db cache: uiState-auxiliary
    2021-09-14 13:09:18,034 [http-nio-8080-exec-50] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: relation "AAF_Asset" does not exist
    Position: 639

  • I gone through the link which you shared and followed few steps which is given. but, still getting same issue.

    even i have given my schema as default  search path in Postgre SQL for searching data from table. this is also did not worked. 

  • 0
    Certified Lead Developer
    in reply to kishoren0003

    Kishore,

    Is this fixed? if not, can you ensure the table name you have in CDT XSD has the same case like the one you have in the database?

  • Vimalkumar,

    Yes, issue got fixed. 

    but, while using Postgre SQL DB i found 2 issues.

    1 Issue:- In Postgre SQL by default schema is Public whatever we created tables under public schema those table's records are fetching in Applian expression rule with out any issues.

    if we created manually our own schema(Test-Schema) that is not working. not sure, whether this is postgre DB issue or something else. during the trail and errors i found this.

    2 Issue:-  Actually, we created CDT using Appain cloud DB and later we changed to PostGreSQL. the datatyp's are changed as per DB column datatype DSE entity mapped verified successfully. 

    post DSE verification, we were trying to read data from in expression rule getting unexpected error which i mentioned above chain conversation.

    Resolution:- post data source test connection successful, i created one more CDT using existing DB for same table and  copied new XSD file content and pasted existing CDT XSD file. after it was working fine.

    i am not sure why this did not worked before which we initially created CDT.

Reply
  • Vimalkumar,

    Yes, issue got fixed. 

    but, while using Postgre SQL DB i found 2 issues.

    1 Issue:- In Postgre SQL by default schema is Public whatever we created tables under public schema those table's records are fetching in Applian expression rule with out any issues.

    if we created manually our own schema(Test-Schema) that is not working. not sure, whether this is postgre DB issue or something else. during the trail and errors i found this.

    2 Issue:-  Actually, we created CDT using Appain cloud DB and later we changed to PostGreSQL. the datatyp's are changed as per DB column datatype DSE entity mapped verified successfully. 

    post DSE verification, we were trying to read data from in expression rule getting unexpected error which i mentioned above chain conversation.

    Resolution:- post data source test connection successful, i created one more CDT using existing DB for same table and  copied new XSD file content and pasted existing CDT XSD file. after it was working fine.

    i am not sure why this did not worked before which we initially created CDT.

Children