Uploaded image for project: 'Apache Hop (Retired)'
  1. Apache Hop (Retired)
  2. HOP-3969

Dimension Lookup / Update cast date to timestamp error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • Migrated to GHI
    • Database
    • None
    • hop 2.0, JAVA11, OracleDB 19, ojdbc10.jar

    Description

      There seems to be a problem with date / timestamp datatypes. In Oracle often date is used instead of timestamp because the date has the time-information. But the Fields "Date range start field" and the "Table date range end" can't cast the date to timestamp. "Support the timestamp data type" is active.

      ERROR: Because of an error this transform can't continue: 
      java.lang.RuntimeException: java.lang.ClassCastException: class java.util.Date cannot be cast to class java.sql.Timestamp (java.util.Date is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')
      java.lang.ClassCastException: class java.util.Date cannot be cast to class java.sql.Timestamp (java.util.Date is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')
      ERROR: org.apache.hop.core.exception.HopException: 
      java.lang.RuntimeException: java.lang.ClassCastException: class java.util.Date cannot be cast to class java.sql.Timestamp (java.util.Date is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')
      java.lang.ClassCastException: class java.util.Date cannot be cast to class java.sql.Timestamp (java.util.Date is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')    at org.apache.hop.pipeline.transforms.dimensionlookup.DimensionCache.lookupRow(DimensionCache.java:172)
          at org.apache.hop.pipeline.transforms.dimensionlookup.DimensionLookup.lookupValues(DimensionLookup.java:388)
          at org.apache.hop.pipeline.transforms.dimensionlookup.DimensionLookup.processRow(DimensionLookup.java:215)
          at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:51)
          at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: java.lang.RuntimeException: java.lang.ClassCastException: class java.util.Date cannot be cast to class java.sql.Timestamp (java.util.Date is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')
          at org.apache.hop.pipeline.transforms.dimensionlookup.DimensionCache.compare(DimensionCache.java:230)
          at org.apache.hop.pipeline.transforms.dimensionlookup.DimensionCache.compare(DimensionCache.java:37)
          at java.base/java.util.Collections.indexedBinarySearch(Collections.java:336)
          at java.base/java.util.Collections.binarySearch(Collections.java:324)
          at org.apache.hop.pipeline.transforms.dimensionlookup.DimensionCache.lookupRow(DimensionCache.java:99)
          ... 4 more
      Caused by: java.lang.ClassCastException: class java.util.Date cannot be cast to class java.sql.Timestamp (java.util.Date is in module java.base of loader 'bootstrap'; java.sql.Timestamp is in module java.sql of loader 'platform')
          at org.apache.hop.core.row.value.ValueMetaTimestamp.getTimestamp(ValueMetaTimestamp.java:125)
          at org.apache.hop.core.row.value.ValueMetaTimestamp.getDate(ValueMetaTimestamp.java:66)
          at org.apache.hop.pipeline.transforms.dimensionlookup.DimensionCache.compare(DimensionCache.java:204)
          ... 8 more
      Finished processing (I=0, O=0, R=1, W=0, U=0, E=1) 

      Attachments

        Activity

          People

            Unassigned Unassigned
            tohrke Tobias Kuhrke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: