Menu

#153 Row.getLocalDateTime() throws java.lang.ClassCastException

Unassigned
closed
nobody
None
1
2019-10-12
2019-10-12
No

ExecutingExecuting spRow.getLocalDateTime("dtExpire") gives the following Exception:

Exception in thread "main" java.lang.ClassCastException: class com.healthmarketscience.jackcess.impl.ColumnImpl$DateExt cannot be cast to class java.time.LocalDateTime (com.healthmarketscience.jackcess.impl.ColumnImpl$DateExt is in unnamed module of loader 'app'; java.time.LocalDateTime is in module java.base of loader 'bootstrap')
at com.healthmarketscience.jackcess.impl.RowImpl.getLocalDateTime(RowImpl.java:111)

jackcess 3.0.1

Discussion

  • James Ahlborn

    James Ahlborn - 2019-10-12
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -Executing spRow.getLocalDateTime("dtExpire") gives the following Exception:
    +ExecutingExecuting spRow.getLocalDateTime("dtExpire") gives the following Exception:
     > Exception in thread "main" java.lang.ClassCastException: class com.healthmarketscience.jackcess.impl.ColumnImpl$DateExt cannot be cast to class java.time.LocalDateTime (com.healthmarketscience.jackcess.impl.ColumnImpl$DateExt is in unnamed module of loader 'app'; java.time.LocalDateTime is in module java.base of loader 'bootstrap')
     > at com.healthmarketscience.jackcess.impl.RowImpl.getLocalDateTime(RowImpl.java:111)
    
    • status: open --> closed
     
  • James Ahlborn

    James Ahlborn - 2019-10-12

    yes, you need to enable localdatetime functionality. see details here: https://jackcess.sourceforge.io/jackcess-3.html

     

Log in to post a comment.