generator-jhipster: 7.0.0 liquibase loaddata no longer works for clob type
Overview of the issue
After migrating to 7.0.0 (and also when generating a clean app):
Any data in loadData in liquibase changelog of type clob ( ../fake-data/blob/ ) will fail, and result in row not inserted in database. No errors are thrown, data is just not loaded.
For example:
id;country_name;country_details
1;vortals Car Hill;../fake-data/blob/hipster.txt
Will result in no rows added in database
I use postgresql for dev and prod profiles.
Motivation for or Use Case
I want to use TextBlob in my entities and load it for development test data (faker)
Reproduce the error
- create new jhipster app v7.0.0
- import jdl with
jhipster import-jdl jhipster-jdl.jh - start postgres database with
npm run docker:db:up - start app with
./mvnw - app will start, but check database, no rows were created.
Related issues
Found some faker.js related stuff, but nothing for 7.0.0
Suggest a Fix
I found that upgrading liquibase in pom.xml from 4.3.1 to 4.3.2 gives me slightly better results:
Instead of empty rows, i get a row with a value equal to the string in the .csv file (so not yet the value in the .txt file).
so in pom.xml
<liquibase.version>4.3.2</liquibase.version>
<liquibase-hibernate5.version>4.3.2</liquibase-hibernate5.version>
gives me all rows in postgres, but doesnt load the file blob correctly
1 "vortals Car Hill" "../fake-data/blob/hipster.txt"
JHipster Version(s)
7.0.0
JHipster configuration
.jo-rc.json
{
"generator-jhipster": {
"blueprints": [],
"otherModules": [],
"applicationType": "monolith",
"baseName": "test2",
"jhipsterVersion": "7.0.0",
"skipClient": false,
"skipServer": false,
"skipUserManagement": false,
"skipCheckLengthOfIdentifier": false,
"skipFakeData": false,
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"testFrameworks": [],
"pages": [],
"creationTimestamp": 1616706708953,
"serviceDiscoveryType": false,
"reactive": false,
"authenticationType": "jwt",
"packageName": "com.mycompany.myapp",
"serverPort": "8080",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"buildTool": "maven",
"serverSideOptions": [],
"websocket": false,
"searchEngine": false,
"messageBroker": false,
"enableSwaggerCodegen": false,
"clientFramework": "react",
"withAdminUi": true,
"clientTheme": "none",
"enableTranslation": false,
"nativeLanguage": "en",
"packageFolder": "com/mycompany/myapp",
"jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
"clientPackageManager": "npm",
"clientThemeVariant": "",
"languages": ["en", "fr"],
"entities": ["Region", "Country"],
"lastLiquibaseTimestamp": 1616706851000
}
}
Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL definitions
entity Region {
regionName String
regionDetails TextBlob
}
entity Country {
countryName String
countryDetails TextBlob
}
Browsers and Operating System
ubuntu 20
- Checking this box is mandatory (this is just to show you read everything)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (20 by maintainers)
The issue is indeed a liquibase issue. I tried different versions of liquibase with following results:
I opened an issue https://github.com/liquibase/liquibase/issues/1790 on liquibase side.
In the meantime, we can revert to liquibase 3.10.2 as it’s the latest working version.
I updated the bounty so both can claim each one 😃
@jidma PR in liquibase project has been merged and has been included in v.4.4.3. Waiting for official release.
@jidma : approved
@DanielFran : approved
@pascalgrimaud Issue is now fixed.
Since @jidma fixed the issue directly on liquibase, can we share the bug-bounty with him?
@pfrumau : I edit your configuration and put this value
YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasonsfor jwtSecret. Because it’s annoying when using your configuration, the jwtSecret is not correct and it makes us to lost time when trying to reproduce, because the generated project is not correct Better solution would be to simply usejhipster infofor you 😃Anyway, I confirm your issue