Closed bertyg closed 6 years ago
It's absolutely not supported to generate an UAA without user management. The main reason to use an UAA is to combine JHipster user management with Spring @enableauthserver. If you remove user management from the UAA then nothing will work properly.
Eventually we could introduce a check that prevents you from choosing both options and displays an error message...
Hi Pierre, Thanks for the response. Sorry, I tried to be concise by uniting all options under the uaa but didn't double check if that had an impact in the application context. I edited the sample JDL file , to show all applications, with appropriate options.
Hi, thanks for the report.Pierre's solution is the way to go.I'll try to do it today.
The issue
Two application options throw errors:
Error: ERROR! Error while parsing applications and entities from the JDL TypeError: Cannot read property 'start' of undefined at Environment.error (/home/berty/.config/yarn/global/node_modules/yeoman-environment/lib/environment.js:157:40) at module.exports.error (/home/berty/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:1970:18) at module.exports.parseJDL (/home/berty/.config/yarn/global/node_modules/generator-jhipster/generators/import-jdl/index.js:155:26) at Object. (/home/berty/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:399:25)
at /home/berty/.config/yarn/global/node_modules/run-async/index.js:25:25
at new Promise ()
at /home/berty/.config/yarn/global/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/home/berty/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)
error: An error has occurred: SyntaxError error: Error message: Expected ",", "/", "applicationType", "authenticationType", "baseName", "buildTool", "cacheProvider", "clientFramework", "clientPackageManager", "databaseType", "devDatabaseType", "enableHibernateCache", "enableSwaggerCodegen", "enableTranslation", "jhiPrefix", "jhipsterVersion", "languages", "messageBroker", "nativeLanguage", "packageName", "path", "prodDatabaseType", "searchEngine", "serverPort", "serviceDiscoveryType", "skipClient", "skipServer", "skipUserManagement", "testFrameworks", "uaaBaseName", "useSass", "websocket", "}", [A-Za-z], or [\n\t\r ] but "2" found. error: Position: At l.17. DEBUG! Error: SyntaxError: SyntaxError: Expected ",", "/", "applicationType", "authenticationType", "baseName", "buildTool", "cacheProvider", "clientFramework", "clientPackageManager", "databaseType", "devDatabaseType", "enableHibernateCache", "enableSwaggerCodegen", "enableTranslation", "jhiPrefix", "jhipsterVersion", "languages", "messageBroker", "nativeLanguage", "packageName", "path", "prodDatabaseType", "searchEngine", "serverPort", "serviceDiscoveryType", "skipClient", "skipServer", "skipUserManagement", "testFrameworks", "uaaBaseName", "useSass", "websocket", "}", [A-Za-z], or [\n\t\r ] but "2" found. at parse (/home/berty/.config/yarn/global/node_modules/jhipster-core/lib/reader/jdl_reader.js:48:11) at Object.parseFromFiles (/home/berty/.config/yarn/global/node_modules/jhipster-core/lib/reader/jdl_reader.js:73:10) at module.exports.parseJDL (/home/berty/.config/yarn/global/node_modules/generator-jhipster/generators/import-jdl/index.js:104:44) at Object. (/home/berty/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:399:25)
at /home/berty/.config/yarn/global/node_modules/run-async/index.js:25:25
at new Promise ()
at /home/berty/.config/yarn/global/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/home/berty/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)
SyntaxError: SyntaxError: Expected ",", "/*", "applicationType", "authenticationType", "baseName", "buildTool", "cacheProvider", "clientFramework", "clientPackageManager", "databaseType", "devDatabaseType", "enableHibernateCache", "enableSwaggerCodegen", "enableTranslation", "jhiPrefix", "jhipsterVersion", "languages", "messageBroker", "nativeLanguage", "packageName", "path", "prodDatabaseType", "searchEngine", "serverPort", "serviceDiscoveryType", "skipClient", "skipServer", "skipUserManagement", "testFrameworks", "uaaBaseName", "useSass", "websocket", "}", [A-Za-z], or [\n\t\r
] but "2" found.
// Applications
application { config { applicationType microservice, authenticationType uaa, baseName marketplace, buildTool maven, cacheProvider hazelcast, databaseType sql, devDatabaseType h2Disk, enableHibernateCache true, enableSwaggerCodegen false, enableTranslation true, jhiPrefix jhi, languages [en, fr], messageBroker false, nativeLanguage en, packageName com.tce.services.marketplace, prodDatabaseType mysql, searchEngine elasticsearch, serverPort 8081, serviceDiscoveryType eureka, skipClient true, skipServer false, skipUserManagement true, testFrameworks [cucumber], uaaBaseName "../uaa", useSass false, websocket false } }
application { config { applicationType uaa, authenticationType uaa, baseName uaa, buildTool maven, cacheProvider hazelcast, databaseType sql, devDatabaseType h2Disk, enableHibernateCache true, enableSwaggerCodegen false, enableTranslation true, jhiPrefix jhi, languages [en, fr], messageBroker false, nativeLanguage en, packageName com.tce.uaa, prodDatabaseType mysql, searchEngine false, serverPort 9999, serviceDiscoveryType eureka, skipClient true, skipServer false, testFrameworks [cucumber], uaaBaseName "../uaa", useSass false, websocket false } }