Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-680

invalid input syntax for type timestamp in db query for stat-initial utility

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted / Claimed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.6.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      DSpace 1.6.2; Java JDK 1.6.0 (Sun); Apache Ant 1.8.1; JUnit 4.8.2; Apache Maven 2.2.1; Apache Tomcat 6.0.26; Apache Httpd 2.2.15; Tomcat Connector 1.2.30 (for mod_jk); PostgreSQL 8.4.4
    • Attachments:
      0
    • Comments:
      4
    • Documentation Status:
      Not Required

      Description

      DSpace 1.6.2 >> Command [dspace]/bin/stat-initial generates an Exception: ERROR: invalid input syntax for type timestamp

      Traced issue to extraneous content in db query in WHERE clause( e.g. AND text_value::timestamp > ...)

      Traced to:
      /dspace-1.6.2-src-release/dspace-api/src/main/java/org/dspace/app/statistics/LogAnalyser.java

      CHANGED FROM:
      Line 1240:
      dateQuery.append(" AND text_value::timestamp > '" +
      unParseDate(startDate) + "'::timestamp ");

      Line 1255:
      dateQuery.append(" AND text_value::timestamp > '" +
      unParseDate(startDate) + "'::timestamp ");

      CHANGED TO:

      Line 1240:
      dateQuery.append(" AND text_value > '" +
      unParseDate(startDate) + "' ");

      Line 1255:
      dateQuery.append(" AND text_value > '" +
      unParseDate(startDate) + "' ");

        Attachments

          Activity

            People

            Assignee:
            mwood Mark H. Wood
            Reporter:
            rrudspace Royal Roads University
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: