Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test compilation failure with entity generated with service option #197

Closed
1 task done
murdos opened this issue Oct 20, 2020 · 0 comments · Fixed by #201
Closed
1 task done

Test compilation failure with entity generated with service option #197

murdos opened this issue Oct 20, 2020 · 0 comments · Fixed by #201
Labels
bug 🐞 Something isn't working

Comments

@murdos
Copy link
Contributor

murdos commented Oct 20, 2020

Overview of the issue

Test compilation failure:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project jhipster: Compilation failure: Compilation failure:
[ERROR] /C:/dev/workspace/jhipster/tests/mn-mvn-jwt-angular/src/test/java/com/mycompany/myapp/web/rest/LabelResourceIT.java:[165,9] cannot find symbol
[ERROR] symbol: variable labelService
[ERROR] location: class com.mycompany.myapp.web.rest.LabelResourceIT
[ERROR] /C:/dev/workspace/jhipster/tests/mn-mvn-jwt-angular/src/test/java/com/mycompany/myapp/web/rest/LabelResourceIT.java:[210,9] cannot find symbol
[ERROR] symbol: variable labelService
[ERROR] location: class com.mycompany.myapp.web.rest.LabelResourceIT

Reproduce the error

Generate an entity with serviceClass or serviceImpl value for service option.

Related issues
Suggest a Fix

Always save the test entity with the entity repository, no need to conditionally use the entity service.

Project configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
{
  "name": "Label",
  "fields": [
    {
      "fieldName": "label",
      "fieldType": "String",
      "fieldValidateRules": ["required", "minlength"],
      "fieldValidateRulesMinlength": "3"
    }
  ],
  "relationships": [
    {
      "relationshipType": "many-to-many",
      "otherEntityName": "operation",
      "otherEntityRelationshipName": "label",
      "relationshipName": "operation",
      "otherEntityField": "id",
      "ownerSide": false
    }
  ],
  "changelogDate": "20201020221801",
  "entityTableName": "label",
  "dto": "no",
  "pagination": "no",
  "service": "serviceClass",
  "jpaMetamodelFiltering": false,
  "fluentMethods": true,
  "readOnly": false,
  "embedded": false,
  "clientRootFolder": "",
  "applications": ["jhipster"]
}
Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants