Closed javachavez closed 1 year ago
Looks an environment error at Jenkins, not a jhipster issue. Please post at stackoverflow. If you manage to reproduce locally, let us know. Don’t forget to update to Java 17.
where can i post it? url please? thanks
https://stackoverflow.com. Use the "jhipster" tag if you want attention from committers.
Overview of the issue
I generate application with Jhipster 8.0.0-beta.2 but sonar analysis appears error, when execute in jenkins file.
Motivation for or Use Case
I need sonar analysis.
Reproduce the error
Generate jhipster application with generator and jdl generator entities Execute in jenkins with jenkinsfile. Appears this error in stage quality analysis:
[INFO] [INFO] --- properties:1.1.0:read-project-properties (default) @ establishment-catalog --- [INFO] [INFO] --- jacoco:0.8.10:prepare-agent (pre-unit-tests) @ establishment-catalog --- [INFO] argLine set to -javaagent:/var/lib/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10-runtime.jar=destfile=/mnt/data/jenkins/workspace/establishment-catalog_sonar/target/jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx1G [INFO] [INFO] -----< com.jumbotours.establishmentcatalog:establishment-catalog >------ [INFO] Building Establishment Catalog 0.0.1-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- sonar:3.9.1.2184:sonar (default-cli) @ establishment-catalog --- [INFO] User cache: /var/lib/jenkins/.sonar/cache [INFO] SonarQube version: 7.9.1 [INFO] Default locale: "es_ES", source code encoding: "UTF-8" [INFO] Load global settings [INFO] Load global settings (done) | time=80ms [INFO] Server id: A7EE8CF2-AXIr741RGzh0g1Z-gz91 [INFO] User cache: /var/lib/jenkins/.sonar/cache [INFO] Load/download plugins [INFO] Load plugins index [INFO] Load plugins index (done) | time=49ms [INFO] Load/download plugins (done) | time=78ms [INFO] Process project properties [INFO] Execute project builders [INFO] Execute project builders (done) | time=3ms [INFO] Project key: establishment-catalog:sonar [INFO] Base dir: /mnt/data/jenkins/workspace/establishment-catalog_sonar [INFO] Working dir: /mnt/data/jenkins/workspace/establishment-catalog_sonar/target/sonar [INFO] Load project settings for component key: 'establishment-catalog:sonar' [INFO] Load project settings for component key: 'establishment-catalog:sonar' (done) | time=19ms [INFO] Load quality profiles [INFO] Load quality profiles (done) | time=43ms [INFO] Detected Jenkins [INFO] Load active rules [INFO] Load active rules (done) | time=406ms [INFO] Indexing files... [INFO] Project configuration: [INFO] Excluded sources: src/main/webapp/content//., src/main/webapp/i18n/.js, target/classes/static//., src/test//. [INFO] Included tests: src/test//. [INFO] 153 files indexed [INFO] 0 files ignored because of inclusion/exclusion patterns [INFO] 0 files ignored because of scm ignore settings [INFO] Quality profile for java: Sonar way jumbo [INFO] Quality profile for web: Sonar way [INFO] Quality profile for xml: Sonar way [INFO] ------------- Run sensors on module establishment-catalog:sonar [INFO] Load metrics repository [INFO] Load metrics repository (done) | time=20ms [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.142 s [INFO] Finished at: 2023-08-10T18:03:11+02:00 [INFO] ------------------------------------------------------------------------ [WARNING] [WARNING] Plugin validation issues were detected in 3 plugin(s) [WARNING] [WARNING] org.jacoco:jacoco-maven-plugin:0.8.10 [WARNING] org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184 [WARNING] org.apache.maven.plugins:maven-resources-plugin:3.3.1 [WARNING] [WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE] [WARNING] [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project establishment-catalog: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar failed: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar: java.lang.ExceptionInInitializerError: null [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/var/lib/jenkins/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.9.1.2184/sonar-maven-plugin-3.9.1.2184.jar [ERROR] urls[1] = file:/var/lib/jenkins/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar [ERROR] urls[2] = file:/var/lib/jenkins/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar [ERROR] urls[3] = file:/var/lib/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar [ERROR] urls[4] = file:/var/lib/jenkins/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.2.588/sonar-scanner-api-2.16.2.588.jar [ERROR] urls[5] = file:/var/lib/jenkins/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] ----------------------------------------------------- [ERROR] : java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @1c5cd2ea [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException [Pipeline] } WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeeded?
JHipster Version(s)
Jhipster 8.0.0-beta.2
JHipster configuration
jhipster info WARNING! Since JHipster v8, the jhipster command will not use the locally installed generator-jhipster. If you want to execute the locally installed generator-jhipster, run: npx jhipster
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ https://www.jhipster.tech Welcome to JHipster v8.0.0-beta.2
Welcome to the JHipster Information Sub-Generator
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
Environment and Tools
openjdk version "11.0.4" 2019-07-16 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11) Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.15.1, JRE 11 Windows 10 amd64-64-Bit Compressed References 20190717_282 (JIT enabled, AOT enabled) OpenJ9 - 0f66c6431 OMR - ec782f26 JCL - fa49279450 based on jdk-11.0.4+11)
git version 2.30.1.windows.1
node: v18.16.0 npm: 9.7.1
'docker' command could not be found
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
√ applying multi-step templates info Multiple customCommitTask tasks found (C:\JIP\develop\BKN\establishment-catalog#jhipster:info, jhipster:bootstrap). Using the first.
Congratulations, JHipster execution is complete! If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Sponsored with ❤️ by @oktadev.
Browsers and Operating System
All Operating System, all browsers
Jenkins File
def gateId = 47 def pom def app def gitRepo = "establishment-catalog"
def cancelPreviousBuilds() { def jobName = env.JOB_NAME def buildNumber = env.BUILD_NUMBER.toInteger() / Get job name / def currentJob = Jenkins.instance.getItemByFullName(jobName)
}
pipeline {
}