cancel
Showing results for 
Search instead for 
Did you mean: 

JdbcSQLNonTransientException: Unknown data type: "DATE_TEXT"

yongkang_guo
Discoverer
0 Kudos

I am referring to URL:

https://cap.cloud.sap/docs/releases/changelog/

Please get back to me on the following feedback:

I've upgraded my project to compiler V2 and met a lot of problems.

The change log (https://cap.cloud.sap/docs/releases/changelog/) says:

[cds-compiler@2.1.0] to.sql:

Changed type mappings for --dialect=sqlite:

  • cds.Date –› DATE_TEXT
  • cds.Time –› TIME_TEXT
  • cds.Timestamp –› TIMESTAMP_TEXT
  • cds.DateTime –› TIMESTAMP_TEXT
  • cds.Binary –› BINARY_BLOB
  • cds.hana.Binary –› BINARY_BLOB

But DATE_TEXT is not a valid type in H2 database! As the doc (https://cap.cloud.sap/docs/java/development/#h2) mentions, the H2 database is supported at development. But obviously it's not.

How should I generate my schema.sql using another dialect, e.g. H2?

View Entire Topic
marcbecker
Employee
Employee
0 Kudos

This is the same issue as you reported in https://answers.sap.com/questions/13339498/h2-database-is-still-not-supported-at-development.html. Please see my answer there.

Check out this PR for reference of using H2 in a CAP Java application: https://github.com/SAP-samples/cloud-cap-samples-java/pull/77