Activiti
  1. Activiti
  2. ACT-1116

Can't browse database tables with activiti-explorer when using Postgresql-9.1

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.9
    • Fix Version/s: 5.10
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ubuntu 11.10 with postgresql-9.1-901.jdbc4 and postgres 9.1.1
    • Number of attachments :
      1

      Description

      When I try to browse table contents in Activiti-explorer Management / Database, I only see empty tables. I suppose that it has something to do with database / transactions parameters, but I'm not sure. I use the standard "webapps/activiti-explorer/WEB-INF/applicationContext.xml". My build.db.properties is:

      db=h2
      jdbc.driver=org.postgresql.Driver
      jdbc.url=jdbc:postgresql://localhost/activiti
      jdbc.username=activiti
      jdbc.password=meymey

      Everything else works fine, like loading demo data, starting processes, getting diagrams, etc.

      1. rows.patch
        1 kB
        Slawomir Wojtasiak

        Activity

        Hide
        Ernesto Revilla added a comment -

        There are no errors in log neither.

        Show
        Ernesto Revilla added a comment - There are no errors in log neither.
        Hide
        Slawomir Wojtasiak added a comment - - edited

        Explorer uses following method to get information about column names. This method returns column names in upper case.

        managementService.getTableMetaData(tableName);

        Then it uses "query.listPage" to get content of the table:

        TablePageQuery query = managementService.createTablePageQuery().tableName(tableName);
        List<Map<String, Object>> rows = query.listPage(start, count).getRows();

        This code returns column names in lower case and they don't math with the column names from "getTableMetaData" its why rows are empty.

        Show
        Slawomir Wojtasiak added a comment - - edited Explorer uses following method to get information about column names. This method returns column names in upper case. managementService.getTableMetaData(tableName); Then it uses "query.listPage" to get content of the table: TablePageQuery query = managementService.createTablePageQuery().tableName(tableName); List<Map<String, Object>> rows = query.listPage(start, count).getRows(); This code returns column names in lower case and they don't math with the column names from "getTableMetaData" its why rows are empty.
        Hide
        Slawomir Wojtasiak added a comment -

        Fast workaround in attachments.

        Show
        Slawomir Wojtasiak added a comment - Fast workaround in attachments.
        Hide
        Ernesto Revilla added a comment -

        Excellent! Will try the patch. I think that the problem is that fields are not enclosed in double quotes when creating the schema. So all fields are converted tu upper case. I think that that Oracle has the same behaviour.

        Show
        Ernesto Revilla added a comment - Excellent! Will try the patch. I think that the problem is that fields are not enclosed in double quotes when creating the schema. So all fields are converted tu upper case. I think that that Oracle has the same behaviour.
        Hide
        Ernesto Revilla added a comment -

        Ok, I tried this already and your patch seems to fix it. Thanks very much!

        Show
        Ernesto Revilla added a comment - Ok, I tried this already and your patch seems to fix it. Thanks very much!
        Hide
        Tijs Rademakers added a comment -

        Applied the patch

        Show
        Tijs Rademakers added a comment - Applied the patch

          People

          • Assignee:
            Tijs Rademakers
            Reporter:
            Ernesto Revilla
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: