Overview of the issue
I generated a new jHipster App (on Windows) with version 6.3.1 and used MYSQL for both DEV and PROD. So far, I have not created any entities. It is purely a newly generated app. However, the application-dev.yml still seems to reference the H2 database in the datasource and jpa sections. Here is the relevant section of this file:
~yaml
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:h2:file:./build/h2db/db/tiweb;DB_CLOSE_DELAY=-1
username: tiweb
password:
hikari:
poolName: Hikari
auto-commit: false
h2:
console:
enabled: false
jpa:
database-platform: io.github.jhipster.domain.util.FixedH2Dialect
database: H2
show-sql: true
properties:
hibernate.id.new_generator_mappings: true
hibernate.connection.provider_disables_autocommit: true
hibernate.cache.use_second_level_cache: true
hibernate.cache.use_query_cache: false
hibernate.generate_statistics: false
hibernate.cache.region.factory_class: com.hazelcast.hibernate.HazelcastCacheRegionFactory
hibernate.cache.hazelcast.instance_name: tiweb
hibernate.cache.use_minimal_puts: true
hibernate.cache.hazelcast.use_lite_member: true
~
Is this a bug or am I missing something here? The application-prod.yml seems to have the correct MYSQL references. If this is a bug, then can I simply copy the above sections from application-prod.yml to the application-dev.yml file, or do I have to do something else also to get DEV to work with MYSQL?
Here is the output of the jHipster info command:
tiwebsql> jhipster info
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator
[email protected] \tiwebsql
`-- [email protected]
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.mycompany.tiweb",
"nativeLanguage": "en"
},
"jhipsterVersion": "6.3.1",
"applicationType": "monolith",
"baseName": "tiweb",
"packageName": "com.mycompany.tiweb",
"packageFolder": "com/mycompany/tiweb",
"serverPort": "8080",
"authenticationType": "oauth2",
"cacheProvider": "hazelcast",
"enableHibernateCache": true,
"websocket": "spring-websocket",
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": "elasticsearch",
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "gradle",
"enableSwaggerCodegen": true,
"embeddableLaunchScript": false,
"useSass": true,
"clientPackageManager": "yarn",
"clientFramework": "react",
"clientTheme": "flatly",
"clientThemeVariant": "primary",
"testFrameworks": [
"gatling",
"protractor"
],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en",
"es"
],
"blueprints": []
}
}
entityName.json files generated in the .jhipster directory
JDL entity definitions
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode)
git version 2.22.0.windows.1
node: v10.16.3
npm: 6.9.0
yeoman: 3.1.0
yarn: 1.17.3
Docker version 19.03.2, build 6a30dfc
docker-compose version 1.24.1, build 4667896b
INFO! Congratulations, JHipster execution is complete!
tiwebsql>
@murdos : why are you tagging it as a bug ? did you manage to reproduce the issue ?
@Alan-CS : I didn't manage to reproduce your generation:
@Alan-CS : If you can provide more information on how you generate your project and/or push a custom project on github
@pascalgrimaud : I tagged this as a bug, in opposition to a feature request. And no I did not manage to reproduce this issue either (but I only tried with master version).
@murdos : ok, in fact, 'bugs' label is only for confirmed bug, otherwise I think we should use 'need to reproduce' by default
Closing as I couldn't reproduce.
Don't hesitate to provide more information, so we can retry to reproduce
I ran the following command to generate: jhipster app --yarn --skip-git
I again regenerated the App but could not reproduce the issue.
Also, originally, I had used H2 for the DEV DB. But then I deleted the entire App and regenerated with everything same except I used MYSQL for both DEV and PROD. And that's when the problem seems to have happened. But I tried this scenario also and could not reproduce the issue.
Anyway, please close this issue.
BTW, I believe, this is a genuine but non reproducible bug. I say this because I now regenerated the app to solve the problem (To use MYSQL for both DEV and PROD) and because I have git in the top level root folder, I see that the following files have changed (To use MYSQL instead of H2):
modified: tiwebsql/build.gradle
modified: tiwebsql/src/main/resources/config/application-dev.yml
modified: tiwebsql/src/main/resources/config/tls/keystore.p12
modified: tiwebsql/yarn.lock
So, it is not me doing something wrong by copying over one file by mistake.
Anyway, for now at least, I can't reproduce it. Just wanted to add this info though.
thanks for your feedback
Most helpful comment
@murdos : ok, in fact, 'bugs' label is only for confirmed bug, otherwise I think we should use 'need to reproduce' by default