sql-to-jdl
sql-to-jdl copied to clipboard
The elements [application.table-to-export] were left unbound
I got this after run mvn
***************************
APPLICATION FAILED TO START
***************************
Description:
Binding to target [Bindable@e2cfdab type = org.blackdread.sqltojava.config.ApplicationProperties, value = 'none',
annotations = array<Annotation>
[@org.springframework.boot.context.properties.ConfigurationProperties(ignoreInvalidFields=false,
ignoreUnknownFields=false, prefix=application, value=application)]] failed:
Property: application.table-to-export
Value: tera
Origin: URL [file:application.yml] - 2:22
Reason: The elements [application.table-to-export] were left unbound.
Action:
Update your application's configuration
My application.xml is:
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:mysql://127.0.0.1:3306/?useUnicode=true&characterEncoding=utf8&useSSL=false
username: root
password:
hikari:
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
jooq:
sql-dialect: mysql
application:
table-to-export: tera
ignored-table-names:
- databasechangelog
- databasechangeloglock
export:
path: ./my-project-jdl.jh
type: jdl
application.xml? -> application.yml
Also check https://github.com/Blackdread/sql-to-jdl/blob/master/src/main/resources/application.yml
Newest version of the code uses database-to-export
Yes. Right that is .yml, not .xml database-to-export made the trick, runs well, but I received an error
the error is explicit, just rename your table calculator-1 to something that can be used by jooq and more importantly by java
Unfortunately I can't rename the table 'cause this is working project. calculator-1 is a legal name for table.
But it seems that Jooq does not use backticks
I've added the table calculator-1 to ignore list for testing purposes and received next error
mvn_error2.log
I executed the code for a project with 250 tables, it worked all good, using mysql 8.0.21 (it used to run 5.7 but we upgraded to latest mysql).
So if you can write a test similar to GenerateForMysql8Test and GenerateForMysql57Test then I would be able to reproduce this error.
Since you are using MariaDB, would be great to have a GenerateForMariaDbTest; Can you do it and have a test sql V1__base.sql like others I used with the extra features you have so to be able to reproduce the problem.
Based on second log, this error comes from the native statement/prepared statement so need to reproduce it with a proper test.
No test provided. Probably should close until is comes up again. This might also be resolved by the switch to native SQL.
Agreed