Jhipster import-jdl controlling what gets generated - jhipster

I have a simple JHipster JDL file that looks like below
entity Student {
name String,
age Integer
}
and I have this saved in a file called student.jh
Now I am trying to make use of the JHipster CLI and generate the entities needed for my dummy project. I noticed that by default JHipster ends up generating the following:
Entity classes
DTO classes
Repository classes
Service classes (I think this we can further customise by adding options as to whether we need service implementation as well)
Rest Controllers
Integration tests
Gatling tests (This I believe is configurable)
I was hoping to know if I could have JHipster skip generating the rest controllers because I would like to add custom rest controllers by hand. I know that I could merely have these controllers alone deleted (along with the Integration Tests that also get generated).
Is there any way in which this can be controlled? I have tried using all of the cli options for jhipster import-jdl but no luck yet.
here's the command I am using
jhipster import-jdl src/main/resources/student.jh
Here's the complete output
jhipster -d import-jdl src/main/resources/student.jh
INFO! Using JHipster version installed globally
DEBUG! Executing CLI only script
DEBUG! cmd: import-jdl from ./import-jdl
DEBUG! args: [object Undefined]
INFO! Executing import-jdl src/main/resources/student.jh
DEBUG! Options: debug: true, skip-install: false, interactive: false, json-only: false, ignore-application: false, ignore-deployments: false, skip-ui-grouping: false, skip-db-changelog: false, skip-sample-repository: false, skipInstall: false, jsonOnly: false, ignoreApplication: false, ignoreDeployments: false, skipUiGrouping: false, skipDbChangelog: false, skipSampleRepository: false, from-cli: true, fromCli: true, inline:
DEBUG! JDLProcessor started with files: src/main/resources/student.jh and options: debug: true, skip-install: false, interactive: false, json-only: false, ignore-application: false, ignore-deployments: false, skip-ui-grouping: false, skip-db-changelog: false, skip-sample-repository: false, skipInstall: false, jsonOnly: false, ignoreApplication: false, ignoreDeployments: false, skipUiGrouping: false, skipDbChangelog: false, skipSampleRepository: false, from-cli: true, fromCli: true
INFO! Found .yo-rc.json on path. This is an existing app
INFO! The JDL is being parsed.
DEBUG! importState exportedEntities: 1
DEBUG! importState exportedApplications: 0
DEBUG! importState exportedDeployments: 0
INFO! Found entities: Student.
INFO! The JDL has been successfully parsed
DEBUG! Applications not generated
INFO! Generating 1 entity.
DEBUG! Generator is starting
Found the .jhipster/Student.json configuration file, entity can be automatically generated!
The entity Student is being updated.
DEBUG! Generator is starting
DEBUG! Time taken to write files: 62ms
create src/main/resources/config/liquibase/changelog/20210202113651_added_entity_Student.xml
create src/main/resources/config/liquibase/fake-data/student.csv
create src/main/java/org/rationaleemotions/domain/Student.java
create src/main/java/org/rationaleemotions/web/rest/StudentResource.java
create src/main/java/org/rationaleemotions/repository/search/StudentSearchRepository.java
create src/main/java/org/rationaleemotions/repository/StudentRepository.java
create src/test/java/org/rationaleemotions/web/rest/StudentResourceIT.java
create src/test/java/org/rationaleemotions/repository/search/StudentSearchRepositoryMockConfiguration.java
create src/test/java/org/rationaleemotions/domain/StudentTest.java
force src/main/resources/config/liquibase/master.xml
DEBUG! Generator has ended
DEBUG! Generator has ended
DEBUG! Deployments not generated
INFO! Congratulations, JHipster execution is complete!
Below is the complete output of my JHipster info command
jhipster info
INFO! Using JHipster version installed globally
INFO! Executing jhipster:info
Welcome to the JHipster Information Sub-Generator
##### **JHipster Version(s)**
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
<details>
<summary>.yo-rc.json file</summary>
<pre>
{
"generator-jhipster": {
"promptValues": {
"packageName": "org.rationaleemotions"
},
"jhipsterVersion": "6.10.5",
"applicationType": "microservice",
"baseName": "necropolis",
"packageName": "org.rationaleemotions",
"packageFolder": "org/rationaleemotions",
"serverPort": "8081",
"authenticationType": "oauth2",
"cacheProvider": "hazelcast",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "mariadb",
"prodDatabaseType": "mariadb",
"searchEngine": "elasticsearch",
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
"embeddableLaunchScript": false,
"creationTimestamp": 1611077969383,
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": false,
"clientPackageManager": "npm",
"blueprints": [],
"skipClient": true,
"skipUserManagement": true
}
}
</pre>
</details>
##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
<details>
<summary>JDL entity definitions</summary>
<pre>
entity Student {
name String,
age Integer
}
microservice Student with necropolis
clientRootFolder Student with necropolis
</pre>
</details>
##### **Environment and Tools**
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
git version 2.30.0
node: v14.15.3
yeoman: 3.1.1
Docker version 20.10.0, build 7287ab3
docker-compose version 1.27.4, build 40524192
identical .jhipster/Student.json
INFO! Congratulations, JHipster execution is complete!

Related

org.hibernate.AnnotationException: Unknown mappedBy - Jhipster onetoone relation

I had this exception in a onetoone relation defined in jhipster:
org.hibernate.AnnotationException: Unknown mappedBy in:
com.plan.vima.domain.Warehouse.orderItem, referenced property unknown:
com.plan.vima.domain.OrdemItem.ordemItem
this was the relationship that I added and that caused my issue:
relationship OneToOne {
OrdemItem to Warehouse {orderItem}
}
Please note that I got this exception running the project as it was jenerated by jhipster after i imported the enetities and the relations - i did notn wrote a line of code.
this is my complete Jhipster project info:
C:\myjh\relwithusers6>jhipster info
Using JHipster version installed locally in current project's node_modules
Executing jhipster:info
Options:
Welcome to the JHipster Information Sub-Generator
##### **JHipster Version(s)**
relwithusers-6#0.0.0 C:\myjh\relwithusers6
`-- generator-jhipster#5.0.1
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folde
r**
<details>
<summary>.yo-rc.json file</summary>
<pre>
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.plan.vima"
},
"jhipsterVersion": "5.0.1",
"applicationType": "monolith",
"baseName": "relwithusers6",
"packageName": "com.plan.vima",
"packageFolder": "com/plan/vima",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "postgresql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"jwtSecretKey": "replaced-by-jhipster-info",
"clientFramework": "angularX",
"useSass": true,
"clientPackageManager": "npm",
"testFrameworks": [],
"jhiPrefix": "jhi",
"enableTranslation": false
}
}
</pre>
</details>
##### **JDL for the Entity configuration(s) `entityName.json` files generated in
the `.jhipster` directory**
<details>
<summary>JDL entity definitions</summary>
<pre>
entity Ordem (ordem) {
ordemNumber String,
dateOpen Instant,
dateClose Instant,
totalAmount Double,
orderstatus Orderstatus
}
entity OrdemItem (ordem_item) {
quantityRequired Integer,
quantityNegotiated Integer,
quantityShipped Integer,
orderstatus Orderstatus
}
entity Warehouse (warehouse) {
unitPrice Double,
quantityRemaining Integer
}
entity Product (product) {
productName String,
unitPrice Double,
isDiscontinued Boolean
}
enum Orderstatus {
REQUIRED,
ABORTED,
SHIPPED,
PARTIALLTYSHIPPED,
NOTSHIPPED,
NOPROD_NOTSHIPPED
}
relationship OneToOne {
OrdemItem{warehouse} to Warehouse
}
relationship OneToMany {
Ordem{orderItem} to OrdemItem{ordem},
Product{orderItem} to OrdemItem{product}
}
relationship ManyToOne {
Ordem{user(login)} to User,
Product{user(login)} to User
}
paginate Ordem, OrdemItem, Warehouse, Product with pagination
</pre>
</details>
##### **Environment and Tools**
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
git version 2.20.1.windows.1
node: v10.15.1
npm: 6.7.0
yeoman: 2.0.5
Congratulations, JHipster execution is complete!
I think it should be like this:
relationship OneToOne {
OrdemItem(warehouse) to Warehouse {orderItem}
}
Because the owner of the relationship is OrdemItem.
See more example here

jhipster-entity-audit issue SQLSTATE(08003)

I generated demo project from scratch. The project compiled and start with no errors and warns.
But after applying jhipster-entity-audit i'm seeing exception:
2018-01-17 03:46:54.194 WARN 128655 --- [demo-Executor-1] com.zaxxer.hikari.pool.ProxyConnection : HikariPool-1 - Connection org.postgresql.jdbc.PgConnection#409be93d marked as broken because of SQLSTATE(08003), ErrorCode(0)
org.postgresql.util.PSQLException: This connection has been closed.
at org.postgresql.jdbc.PgConnection.checkClosed(PgConnection.java:803)
at org.postgresql.jdbc.PgConnection.getAutoCommit(PgConnection.java:764)
at com.zaxxer.hikari.pool.HikariProxyConnection.getAutoCommit(HikariProxyConnection.java)
at liquibase.database.jvm.JdbcConnection.rollback(JdbcConnection.java:336)
at liquibase.database.AbstractJdbcDatabase.rollback(AbstractJdbcDatabase.java:1166)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:205)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:170)
at liquibase.Liquibase.update(Liquibase.java:196)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:94)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$0(AsyncSpringLiquibase.java:77)
at io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
When applying jhipster-entity-audit I selected:
Custom JHipster auditing (works with SQL)
JHipster version: 4.13.3
.yo-rc.json:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.mycompany.myapp",
"nativeLanguage": "en"
},
"jhipsterVersion": "4.13.3",
"baseName": "demo",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "maven",
"enableSocialSignIn": false,
"enableSwaggerCodegen": false,
"jwtSecretKey": "58737acdea1188e4cf1654fcec9e216448299e87",
"clientFramework": "angularX",
"useSass": true,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"testFrameworks": [],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en"
]
},
"generator-jhipster-entity-audit": {
"auditFramework": "custom"
}
}
Entity configuration(s):
no entityName.json file
Browsers and Operating System:
Linux Mint 18.3 Sylvia
npm -v
5.6.0
node -v
v8.9.4
Please advice find workaround this issue.
Updated: I opened issue: https://github.com/hipster-labs/generator-jhipster-entity-audit/issues/82
workaround:
tip from #deepu105 for workaround just add string
cm.createCache(com.mycompany.myapp.domain.EntityAuditEvent.class.getName(), jcacheConfiguration);
to CacheConfiguration.java file
I had the same problem when I used IntelliJ for running dev. server.
I don't know why but i resolved it whith this step :
build manually with maven for test if it's an intelliJ bug (for me build is OK) :
./mvnw
got to intellij and open maven pannel : "view" --> "tools windows" --> "maven project"
On "profiles" menu active and desactive and active (again) "IDE" profile (for me "dev" profile is active too)
Now, try to build with intellij.
good luck
I had same problem.
And I realized that because of my dicision using OAuth2.
And I created new jhipster project using HTTP Session Authentication and run project again.
It's OK. Good luck

how do I install node, npm, angular cli on MAC?

I've been trying to install the angular cli for several days now with now luck. I've tried installing node manually, and with brew. I've uninstalled node and reinstalled. I've also tried fixing the npm permission with steps found here: https://docs.npmjs.com/getting-started/fixing-npm-permissions
I've checked that all the appropriate directories have correct permissions. I do think it odd that even when uninstalling and reinstalling the npm config prefix is
'/Users/myusername/.npm-packages' instead of '/usr/local'.
Any help on how to get this installed correctly would be appreciated!
I'm running macOS Sierra 10.12.6.
node -v = v8.9.0
npm -v = 5.5.1
When trying to run 'ng version' I get '-bash: ng: command not found'.
npm config get prefix =
/Users/myusername/.npm-packages
npm config get
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.5.1 node/v8.9.0 darwin x64"
; userconfig /Users/myusername/.npmrc
prefix = "/Users/myusername/.npm-packages"
; builtin config undefined
; node bin location = /usr/local/bin/node
; cwd = /Users/myusername/.npm-packages/etc
; HOME = /Users/myusername
; "npm config ls -l" to show all defaults.
npm info #angular/cli
{ name: '#angular/cli',
description: 'CLI tool for Angular',
'dist-tags': { latest: '1.5.0', next: '1.5.0-rc.8' },
versions:
[ '1.0.0-beta.28.3',
'1.0.0-beta.29',
'1.0.0-beta.30',
'1.0.0-beta.31',
'1.0.0-beta.32',
'1.0.0-beta.32.2',
'1.0.0-beta.32.3',
'1.0.0-beta.33',
'1.0.0-beta.33.1',
'1.0.0-rc.0',
'1.0.0-rc.1',
'1.0.0-rc.2',
'1.0.0-rc.3',
'1.0.0-rc.4',
'1.0.0',
'1.0.1',
'1.0.2',
'1.0.3',
'1.0.4',
'1.0.5',
'1.0.6',
'1.1.0-beta.0',
'1.1.0-beta.1',
'1.1.0-rc.0',
'1.1.0-rc.1',
'1.1.0-rc.2',
'1.1.0',
'1.1.1',
'1.1.2',
'1.1.3',
'1.2.0-beta.0',
'1.2.0-beta.1',
'1.2.0-rc.0',
'1.2.0-rc.1',
'1.2.0',
'1.2.1',
'1.2.2',
'1.2.3',
'1.2.4',
'1.2.5',
'1.2.6',
'1.2.7',
'1.2.8',
'1.3.0-beta.0',
'1.3.0-beta.1',
'1.3.0-rc.0',
'1.3.0-rc.1',
'1.3.0-rc.2',
'1.3.0-rc.3',
'1.3.0-rc.4',
'1.3.0-rc.5',
'1.3.0',
'1.3.1',
'1.3.2',
'1.4.0-beta.0',
'1.4.0-beta.1',
'1.4.0-beta.2',
'1.4.0-rc.0',
'1.4.0-rc.1',
'1.4.0-rc.2',
'1.4.0',
'1.4.1',
'1.4.2',
'1.4.3',
'1.4.4',
'1.4.5',
'1.4.6',
'1.4.7',
'1.4.8',
'1.4.9',
'1.5.0-beta.0',
'1.5.0-beta.1',
'1.5.0-beta.2',
'1.5.0-beta.3',
'1.5.0-beta.4',
'1.5.0-rc.0',
'1.5.0-rc.1',
'1.5.0-rc.2',
'1.5.0-rc.3',
'1.5.0-rc.4',
'1.5.0-rc.5',
'1.5.0-rc.6',
'1.5.0-rc.7',
'1.5.0-rc.8',
'1.5.0' ],
maintainers:
[ 'angular-cli <hansl#google.com>',
'angular <angular-core+npm#google.com>' ],
time:
{ modified: '2017-11-01T19:14:57.082Z',
created: '2017-02-01T22:39:48.654Z',
'1.0.0-beta.28.3': '2017-02-01T22:39:48.654Z',
'1.0.0-beta.29': '2017-02-02T02:31:47.645Z',
'1.0.0-beta.30': '2017-02-03T01:33:52.259Z',
'1.0.0-beta.31': '2017-02-09T23:56:06.277Z',
'1.0.0-beta.32': '2017-02-17T01:51:53.654Z',
'1.0.0-beta.32.2': '2017-02-17T02:00:52.484Z',
'1.0.0-beta.32.3': '2017-02-17T02:08:23.149Z',
'1.0.0-beta.33': '2017-02-25T05:21:36.887Z',
'1.0.0-beta.33.1': '2017-02-25T05:59:19.475Z',
'1.0.0-rc.0': '2017-02-25T07:30:35.378Z',
'1.0.0-rc.1': '2017-03-03T03:12:06.772Z',
'1.0.0-rc.2': '2017-03-13T23:35:46.979Z',
'1.0.0-rc.3': '2017-03-21T00:49:12.653Z',
'1.0.0-rc.4': '2017-03-21T01:33:52.067Z',
'1.0.0': '2017-03-24T03:08:08.615Z',
'1.0.1': '2017-04-25T02:55:49.584Z',
'1.0.2': '2017-05-03T22:57:19.031Z',
'1.1.0-beta.0': '2017-05-03T23:50:36.374Z',
'1.0.3': '2017-05-09T21:00:17.413Z',
'1.1.0-beta.1': '2017-05-09T21:42:35.163Z',
'1.1.0-rc.0': '2017-05-15T22:19:37.926Z',
'1.0.4': '2017-05-18T17:54:04.979Z',
'1.0.5': '2017-05-24T22:17:19.130Z',
'1.1.0-rc.1': '2017-05-24T22:36:47.469Z',
'1.0.6': '2017-05-25T17:57:32.914Z',
'1.1.0-rc.2': '2017-05-25T18:22:24.404Z',
'1.1.0': '2017-05-31T20:22:53.831Z',
'1.2.0-beta.0': '2017-05-31T21:13:50.572Z',
'1.1.1': '2017-06-07T21:01:59.836Z',
'1.2.0-beta.1': '2017-06-07T21:44:09.173Z',
'1.1.2': '2017-06-15T20:39:42.222Z',
'1.2.0-rc.0': '2017-06-15T21:16:57.470Z',
'1.1.3': '2017-06-21T21:48:12.505Z',
'1.2.0-rc.1': '2017-06-21T22:31:33.214Z',
'1.2.0': '2017-06-29T19:21:25.576Z',
'1.3.0-beta.0': '2017-06-29T19:55:56.904Z',
'1.2.1': '2017-07-12T17:34:40.198Z',
'1.3.0-beta.1': '2017-07-12T18:38:33.167Z',
'1.2.2': '2017-07-20T21:06:26.951Z',
'1.2.3': '2017-07-21T17:57:50.477Z',
'1.3.0-rc.0': '2017-07-21T22:22:01.734Z',
'1.2.4': '2017-07-24T19:01:16.743Z',
'1.3.0-rc.1': '2017-07-24T19:03:08.281Z',
'1.2.5': '2017-07-26T21:09:37.299Z',
'1.3.0-rc.2': '2017-07-26T21:26:55.403Z',
'1.2.6': '2017-07-27T18:29:09.611Z',
'1.3.0-rc.3': '2017-07-27T18:55:31.455Z',
'1.2.7': '2017-08-03T17:51:53.604Z',
'1.3.0-rc.4': '2017-08-03T18:26:06.546Z',
'1.3.0-rc.5': '2017-08-03T19:16:35.510Z',
'1.2.8': '2017-08-09T22:34:57.034Z',
'1.3.0': '2017-08-09T23:33:40.392Z',
'1.4.0-beta.0': '2017-08-10T23:31:35.610Z',
'1.3.1': '2017-08-17T20:44:40.289Z',
'1.4.0-beta.1': '2017-08-18T00:00:02.218Z',
'1.4.0-beta.2': '2017-08-18T19:06:12.921Z',
'1.3.2': '2017-08-23T22:03:53.021Z',
'1.4.0-rc.0': '2017-08-23T22:11:28.919Z',
'1.4.0-rc.1': '2017-08-25T21:05:15.145Z',
'1.4.0-rc.2': '2017-08-30T00:23:14.662Z',
'1.4.0': '2017-09-07T16:31:09.637Z',
'1.4.1': '2017-09-08T22:39:19.578Z',
'1.5.0-beta.0': '2017-09-14T00:03:25.612Z',
'1.4.2': '2017-09-14T00:35:39.637Z',
'1.4.3': '2017-09-22T02:00:04.404Z',
'1.5.0-beta.1': '2017-09-22T02:02:52.519Z',
'1.4.4': '2017-09-28T23:01:05.205Z',
'1.5.0-beta.2': '2017-09-28T23:03:16.645Z',
'1.5.0-beta.3': '2017-10-03T20:33:31.803Z',
'1.4.5': '2017-10-05T21:29:06.347Z',
'1.5.0-beta.4': '2017-10-05T21:32:26.527Z',
'1.4.6': '2017-10-12T01:31:14.231Z',
'1.4.7': '2017-10-12T16:52:14.901Z',
'1.5.0-rc.0': '2017-10-12T17:28:05.424Z',
'1.4.8': '2017-10-18T20:09:29.000Z',
'1.5.0-rc.1': '2017-10-18T20:13:37.270Z',
'1.4.9': '2017-10-19T22:54:59.961Z',
'1.5.0-rc.2': '2017-10-19T23:36:26.426Z',
'1.5.0-rc.3': '2017-10-24T05:17:28.861Z',
'1.5.0-rc.4': '2017-10-26T17:21:40.607Z',
'1.5.0-rc.5': '2017-10-27T01:21:13.361Z',
'1.5.0-rc.6': '2017-10-28T00:35:11.786Z',
'1.5.0-rc.7': '2017-10-30T18:27:09.785Z',
'1.5.0-rc.8': '2017-10-30T23:39:34.512Z',
'1.5.0': '2017-11-01T19:14:57.082Z' },
homepage: 'https://github.com/angular/angular-cli',
keywords: [ 'angular', 'angular-cli', 'Angular CLI' ],
repository:
{ type: 'git',
url: 'git+https://github.com/angular/angular-cli.git' },
author: 'Angular Authors',
bugs: { url: 'https://github.com/angular/angular-cli/issues' },
license: 'MIT',
readmeFilename: 'README.md',
users:
{ avil13: true,
tonimoeckel: true,
jota: true,
baschte: true,
stormos: true,
szamocza: true,
db6edr: true,
willvanpelt: true,
'ognjen.jevremovic': true,
plastikaweb: true,
waiwaiku: true,
adli: true,
reekdeb: true,
'n.sanitate': true,
niilante: true,
qingqingcao: true,
stefaans: true,
'jlouros-io': true,
fadihania: true,
wilda: true,
fdagosti: true,
albertico88: true,
kremr: true,
plauret: true,
infrabill: true,
manojkhannakm: true,
julianomontini: true,
'stone-jin': true,
springy: true,
fmakareev: true,
rastrearcelularonline: true,
majkel: true,
onsentamago: true,
markymark: true,
korbraan: true,
allen_l_liu: true,
polyeezy: true,
joshdoescode: true,
sirhcybe: true,
shadster: true,
samersm: true,
tommyldunn: true,
willwm: true,
aran_sk: true,
khcjump: true,
orenschwartz: true,
yangzw: true,
stephanlv: true,
advpat: true,
tifbs: true,
johnnyjohnjohn: true,
iamclaytonray: true,
shekharreddy: true,
elijahsh: true },
version: '1.5.0',
main: 'lib/cli/index.js',
trackingCode: 'UA-8594346-19',
bin: { ng: './bin/ng' },
engines: { node: '>= 6.9.0', npm: '>= 3.0.0' },
dependencies:
{ '#angular-devkit/build-optimizer': '~0.0.31',
'#angular-devkit/schematics': '~0.0.34',
'#ngtools/json-schema': '1.1.0',
'#ngtools/webpack': '1.8.0',
'#schematics/angular': '~0.1.0',
autoprefixer: '^6.5.3',
chalk: '~2.2.0',
'circular-dependency-plugin': '^3.0.0',
'common-tags': '^1.3.1',
'copy-webpack-plugin': '^4.1.1',
'core-object': '^3.1.0',
'css-loader': '^0.28.1',
cssnano: '^3.10.0',
denodeify: '^1.2.1',
'ember-cli-string-utils': '^1.0.0',
'exports-loader': '^0.6.3',
'extract-text-webpack-plugin': '3.0.0',
'file-loader': '^1.1.5',
'fs-extra': '^4.0.0',
glob: '^7.0.3',
'html-webpack-plugin': '^2.29.0',
'karma-source-map-support': '^1.2.0',
less: '^2.7.2',
'less-loader': '^4.0.5',
'license-webpack-plugin': '^1.0.0',
lodash: '^4.11.1',
'memory-fs': '^0.4.1',
'node-modules-path': '^1.0.0',
nopt: '^4.0.1',
opn: '~5.1.0',
portfinder: '~1.0.12',
'postcss-custom-properties': '^6.1.0',
'postcss-loader': '^1.3.3',
'postcss-url': '^5.1.2',
'raw-loader': '^0.5.1',
resolve: '^1.1.7',
rxjs: '^5.5.2',
'sass-loader': '^6.0.3',
semver: '^5.1.0',
'silent-error': '^1.0.0',
'source-map-loader': '^0.2.0',
'source-map-support': '^0.4.1',
'istanbul-instrumenter-loader': '^2.0.0',
'style-loader': '^0.13.1',
stylus: '^0.54.5',
'stylus-loader': '^3.0.1',
'uglifyjs-webpack-plugin': '1.0.0',
'url-loader': '^0.6.2',
webpack: '~3.8.1',
'webpack-concat-plugin': '1.4.0',
'webpack-dev-middleware': '~1.12.0',
'webpack-dev-server': '~2.9.3',
'webpack-merge': '^4.1.0',
'webpack-sources': '^1.0.0',
'webpack-subresource-integrity': '^1.0.1',
'zone.js': '^0.8.14',
'node-sass': '^4.3.0' },
optionalDependencies: { 'node-sass': '^4.3.0' },
dist:
{ integrity: 'sha512-nCXvqNCdi+8aOU2v6EABZsMg5bB7iM+wfaoWKnu9M5fOW2Rm+7/3Y1gDQKyFkgXCzXdy3J/xpfmwT0gjmjlvIA==',
shasum: '2abc3ff1648d54ad4a14f82f9d517f371370406c',
tarball: 'https://registry.npmjs.org/#angular/cli/-/cli-1.5.0.tgz' },
directories: {} }
I'll be talking about Angular CLI only.
With reference to Angular CLI, I'll assume that you tried installing it without -g flag with NPM.
Step 1: Install Angular CLI from NPM
npm install -g #angular/cli
Step 2: Generate a new app from Angular CLI
ng new <APP NAME>
Step 3: Changing directories
cd <APP NAME>
Step 4: Serving your app
ng serve
If all fails, please have a try of the following.
Step 1: Changing directories (Fallback Option)
cd <NPM ANGULAR CLI DIRECTORY>
Step 2: Running ng locally (Fallback Option)
./bin/ng new <APP NAME> --directory <WHERE EVER YOU WANT IT TO GENERATE>
Hope this helps.

GET /api/account returns error when LDAP authentication is enabled in Jhipster uaa app

Overview of the issue
GET /api/account return 500 error when we have ldap integration in jhipster uaa, the user is present in ldap directory not in the uaa DB, therefore it return 500 error, no user found
Motivation for or Use Case
It is a doubt, so my question is should we add the user in DB after successful authentication from Ldap or do I need to update the API according to my requirement, which will be the solution.
Reproduce the error
Add embedded ldap configuration in uaa:
#override
public void configure(AuthenticationManagerBuilder auth) throws Exception {
if (enabled.equalsIgnoreCase("true")) {
ContextSourceBuilder csb = auth.ldapAuthentication().userSearchBase(userSearchBase).userSearchFilter(userSearchFilter).groupSearchBase(groupSearchBase).groupSearchFilter(groupSearchFilter).contextSource();
if (StringUtils.isNotEmpty(root)) {
csb.root(root);
}
if (StringUtils.isNotEmpty(ldapUrl)) {
csb.url(ldapUrl);
}
if (StringUtils.isNotEmpty(ldifFilePath)) {
csb.ldif(ldifFilePath);
}
if (StringUtils.isNotEmpty(manager)) {
csb.managerDn(manager);
}
if (StringUtils.isNotEmpty(managerPassword)) {
csb.managerPassword(managerPassword);
}
} else {
auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
}
}
When user logs in, the user is verified from ldap directory and after login GET /api/account is trigerred for some information. The user is not present in the uaa app DB, therefore it returns error.
Related issues
Suggest a Fix
JHipster Version(s)
4.3.0
JHipster configuration
Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
/home/varunn/git/etuaa
`-- generator-jhipster#4.3.0
JHipster configuration, a .yo-rc.json file generated in the root folder
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.abc.uaa",
"nativeLanguage": "en"
},
"jhipsterVersion": "4.3.0",
"baseName": "uaa",
"packageName": "com.abc.uaa",
"packageFolder": "com/abc/uaa",
"serverPort": "9999",
"authenticationType": "uaa",
"hibernateCache": "hazelcast",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSocialSignIn": false,
"enableTranslation": true,
"applicationType": "uaa",
"testFrameworks": [
"gatling",
"cucumber"
],
"jhiPrefix": "jhi",
"skipClient": true,
"nativeLanguage": "en",
"languages": [
"en",
"fr",
"es"
],
"clientPackageManager": "yarn"
}
}
Entity configuration(s) entityName.json files generated in the .jhipster directory
ls: no such file or directory: .jhipster/*.json
Browsers and Operating System
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
git version 2.7.4
node: v8.4.0
npm: 5.3.0
yeoman: 1.8.5
yarn: 0.24.6
Docker version 17.03.1-ce, build c6d412e
docker-compose version 1.14.0, build c7bdf9e
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
Chrome and
Ubuntu 16.04

Appium Webdriverio Setup

I need help understanding how to set up a testing framework to using Appium, Webdriverio, Node.js, Jasmine. I have the wdio.conf.js file set up:
host: '127.0.0.1',
port: 4723,
path: '/wd/hub',
....
specs: [
'./spec/wdtest/test.js'
],
....
capabilities: [
{
automationName: "appium",
browserName: 'iOS',
commandTimeout: '7200',
sessionOverride: true,
debugLogSpacing: true,
platformVersion: '10.1',
platformName: 'iOS',
showIosLog: true,
deviceName: 'iPhone 6s',
nativeInstrumentsLib: true,
isolateSimDevice: true,
autoLaunch: true,
app: '/Users/fodgerl/Library/Developer/Xcode/...../Debug-iphonesimulator/myapp.app'
}
],
....
services: ['appium'],
appium: {
args: {
address: '127.0.0.1',
commandTimeout: '7200',
sessionOverride: true,
debugLogSpacing: true,
platformVersion: '10.1',
platformName: 'iOS',
deviceName: 'iPhone 6s',
showIosLog: true,
nativeInstrumentsLib: true,
isolateSimDevice: true,
app: '/Users/fodgerl/Library/...../Products/Debug-iphonesimulator/myapp.app'
}
},
framework: 'jasmine',
My package.json file has:
"scripts": {
"test": "wdio wdio.conf.js"
},
And I have a test js file that has this:
describe('test', function() {
it('test', function () {
//how do I interact with the app?
console.log("HEREEEEE");
});
});
When I run npm test, the simulator launches and the app launches within it. What I don't know is where to go to next? How do I open app/interact with elements/etc.
I have seen examples like:
var client = webdriverio.remote({
port: 4723,
logLevel: 'verbose',
desiredCapabilities: {
platformName: 'iOS',
platformVersion: '8.4',
deviceName: 'iPhone 6',
app: webviewApp
}
});
But do I need to do that if I already have the simulator up and running from the stuff in the conf file? I was trying to find some documentation on what .remote(), init(), etc does. Also, I looked in the Launcher for webdriverio but I couldn't determine where/how it was being used in the example here: https://github.com/webdriverio/webdriverio/blob/master/examples/wdio/runner-specs/jasmine.spec.js
Any help would be appreciated to get me started!! Thanks!
On running $ npm test, it executes $ ./node_modules/.bin/wdio wdio.conf.js. So you have the wdio test runner up and running.
Now, as mentioned in The Browser Object subsection:
If you use the wdio test runner you can access the webdriver instance through the global browser object. The session is initialized by the test runner so you don’t need to call init command. The same goes for ending the session. This is also done by the test runner process.
That's it! You can access the driver instance via the global variable browser as illustrated in the aforementioned example.
Hope that helps!
webdriver.io is just for running the tests. Not interacting with the app. Use appium to app/interact with elements/etc. Appium will record the step and elements path/s. From here you can create your test cases which can be run using wedriver.io

Resources