I'm trying to import a "jh" file. I'm using jdl studio, and I'm using the default template downloaded from the jdl studio web page.
I'm starting with the project and it's my first example.
The jdl is being parsed.
{ name: 'NullPointerException',
message: 'The parsed JDL content and the database type must be passed.',
prototype:
Error
at new buildException (C:Users\Jgutierrez\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\jhips
ter-core\lib\exceptions\exception_factory.js:43:25)
at Object.parse [as convertToJDL] (C:Users\Jgutierrez\AppData\Roaming\npm\node_modules\generator-jhipster\node_m
odules\jhipster-core\lib\parser\jdl_parser.js:36:11)
at module.exports.JDLGenerator.extend.default.parseJDL (C:Users\Jgutierrez\AppData\Roaming\npm\node_modules\gene
rator-jhipster\generators\import-jdl\index.js:45:41)
at Object.
n-generator\lib\base.js:439:23)
at C:Users\Jgutierrez\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-generator\node_mod
ules\run-async\index.js:25:25
at C:Users\Jgutierrez\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-generator\node_mod
ules\run-async\index.js:24:19
at C:Users\Jgutierrez\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\base
.js:440:9
at runCallback (timers.js:566:20)
at tryOnImmediate (timers.js:546:5)
at processImmediate [as _immediateCallback] (timers.js:525:5) }
Error jhipster:import-jdl .\jhipster-jdl.jh -db h2
ERROR!
Error while parsing entities from JDL
https://github.com/jhipster/generator-jhipster/issues/3532
Just fix it!
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b15, mixed mode)
git version 2.9.0.windows.1
node: v6.3.0
npm: 3.10.3
bower: 1.8.0
gulp:
[11:38:55] CLI version 1.2.2
yeoman: 1.8.5
Docker version 1.12.3, build 6b644ec
docker-compose version 1.8.1, build 004ddae
JHipster version is the latest one... I think 3.12.2.
.yo-rc.json
file generated in the root folderI don't have this file because the importation is not working.
entityName.json
files generated in the .jhipster
directoryI don't have this file because the importation is not working.
I'm using windows 10 pro.
@juandavidgc did you run yo jhipster
before trying to import the file ? Then you should have a .yo-rc.json
Also, please be more respectful about our work ("Just fix it!", really ?)
Just add a .yo-rc.json
!
:-)
Just read the documentation!
I had a similar issue. While importing a jdl from jdl studio, throws me the same error:
message: 'The parsed JDL content and the database type must be passed.'
my .yo-rc.json
{
"generator-jhipster": {
"clientFramework": "angular1",
"useSass": false,
"clientPackageManager": "yarn",
"jhipsterVersion": "4.5.2",
"applicationType": "monolith",
"baseName": "receta",
"testFrameworks": [],
"jhiPrefix": "jhi",
"skipServer": true,
"enableTranslation": false
}
}
Same here.
.yo-rc.json:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.gigi.test"
},
"jhipsterVersion": "4.9.0",
"baseName": "test",
"packageName": "com.gigig.test",
"packageFolder": "com/gigi/test",
"serverPort": "8081",
"authenticationType": "jwt",
"hibernateCache": "no",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "cassandra",
"devDatabaseType": "cassandra",
"prodDatabaseType": "cassandra",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "gradle",
"enableSocialSignIn": false,
"enableSwaggerCodegen": false,
"jwtSecretKey": "ecb6aba182d249da698d3e1f448e8ad595d3d274",
"enableTranslation": false,
"applicationType": "microservice",
"testFrameworks": [],
"jhiPrefix": "jhi",
"skipClient": true,
"skipUserManagement": true,
"clientPackageManager": "yarn"
}
}
I'll handle it guys, I'll have a look when I get home
Hello, I see that this issue was closed in January then assigned in October. Is it re-opened ?
I'm asking as I'm experiencing a similar (perhaps the same) problem and am wondering if I should open a new issue or wait until this one is resolved.
My .yo-rc.json doesn't differ much from deathrix's :
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.mycompany.myapp"
},
"jhipsterVersion": "4.9.0",
"baseName": "JdlExample",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"serverPort": "8080",
"authenticationType": "jwt",
"hibernateCache": "no",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "mongodb",
"devDatabaseType": "mongodb",
"prodDatabaseType": "mongodb",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "gradle",
"enableSocialSignIn": false,
"enableSwaggerCodegen": false,
"jwtSecretKey": "da534e639a0ea6945da12faf8ce19778b416eac2",
"clientFramework": "angular1",
"useSass": false,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"jhiPrefix": "jhi",
"enableTranslation": false
}
}
This issue was resolved long back. If you have an issue open a ticket with all info asked for in the issue template following our guidelines
Most helpful comment
Just read the documentation!