With SonarQube 6.5, jdk 1.8.0_144 and sonar.maven.plugin 3.3.0.603, running mvn sonar:sonar gives me the following error:
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project tdd: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar: javax/xml/bind/JAXBException
What am i missing?
Thanks,
Nilesh
I encountered this issue today as well. I recently installed JDK 9.0.1 and had switched the language level of my project over to source and target version 1.9. Executing a clean install triggered this exception. The issue was fixed and released recently in issue 2506 of their JIRA, so updating the sonarjava plugin from the sonarqube instance's administation panel fixed the issue for me.
Run into the same exact problem while running sonar analysis with java-9.
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00)
Maven home: D:\java\maven\3.5.0\bin\..
Java version: 9, vendor: Oracle Corporation
Java home: D:\java\jdk\1.9.0_181
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
...
[INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) # _test ---
...
[INFO] SonarQube version: 6.5.0
...
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project
maven:sonar-maven-plugin:3.3.0.603:sonar: javax/xml/bind/JAXBException
Same build still works fine with java-8.
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00)
Maven home: D:\java\maven\3.5.0\bin\..
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: D:\java\jdk\1.8.0_131\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
...
[INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) # _test ---
...
[INFO] SonarQube version: 6.5.0
...
[INFO] BUILD SUCCESS
I see same behavior with javax.javaee-api 6.0 7.0 or 8.0 thus problem seems to be not related to project dependencies.
Older org.sonarsource.scanner.maven.sonar-maven-plugin 3.2 version of plugin produces same result thus problem is not related to newer 3.3.0.603 plugin version.
Run only with maven 3.5.0.
Just for sake of it successfully tested with 1.8.0_144 in addition to 1.8.0_131.
Exact version of SonarQube is 6.5.0.27846.
Just a suggestion: make sure you are actually running java-8.
mvn -v
Related
For mvn help:describe -Dplugin=help, I am getting:
Failed to execute goal org.apache.maven.plugins:maven-help-plugin:3.2.0:describe (default-cli)
on project standalone-pom: Execution default-cli of goal
org.apache.maven.plugins:maven-help-plugin:3.2.0:describe failed: An API incompatibility was encountered while executing
org.apache.maven.plugins:maven-help-plugin:3.2.0:describe:
java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so
It says, it cannot load a library from my JVM, which I installed via apt, so I guess it also installed all needed libraries?
PS: In directory /usr/lib/jvm/java-11-openjdk-amd64/lib, these are files with libawt name:
libawt_headless.so libawt.so
cannot find the needed one libawt_xawt.so
mvn -version:
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.8.0-59-generic", arch: "amd64", family: "unix"
Is there an examples of a JHipster Oracle 11g implementation around?
I thought I had everything set up correctly, but still not able to run ./mvnw without the application throwing errors. Unfortunately not a lot is available on the specific error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project cdp: Compilation failure: Compilation failure:
[ERROR] error reading /Users/millera/.m2/repository/io/github/jhipster/jhipster-framework/3.0.3/jhipster-framework-3.0.3.jar; zip END header not found
I initially thought this was an issue with Maven on my system, but it seems to be working for other things, and if I run mvn --version I get back:
Maven home: /usr/local/Cellar/maven/3.6.2/libexec
Java version: 11.0.4, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.6", arch: "x86_64", family: "mac"
It's an issue with your maven local repository which for some unknown reason has a corrupted jar of jhipster-framework.
Try cleaning it up with rm -rf /Users/millera/.m2/repository/io/github/jhipster and restart your app with ./mvnw.
I try to execute the Maven goal to build and run Apache Tapestry 5.4.x locally but it always failed:
Ideas I tried:
IntelliJ official Plugin arch type
Getting started from tapestry.org
Hotel booking example from GitHub.
Maven / Java version
tobia#FooDesktop MINGW64 ~/IdeaProjects
$ mvn --version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
Maven home: C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.0\bin\..
Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_191\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Errors
Getting Started:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: org .apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Lexical error, Encountered: "\ufffd" (65 533), after : "" at archetype-resources/src/main/webapp/mybootstrap/fonts/glyphicons-halflings-regular.eot[line 16, column 21] -> [Help 1]
Example:
[ERROR] /C:/Users/tobia/IdeaProjects/tapestry5-hotel-booking/src/main/java/com/tap5/hotelbooking/services/BasicAuthenticator.java:[87,13] try-with-resources is not supported in -source 1.5
For further information, please see the stracktraces attched to this: GitHub Gist.
After I posted this question to the offical Mailing list. The following Maven command worked:
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate \
-DarchetypeGroupId=org.apache.tapestry \
-DarchetypeArtifactId=quickstart \
-DarchetypeVersion=5.4.4 \
-DarchetypeRepository=local
While running a build in Jenkins Maven is complaining about JDK. I know very well that it's some challenge with env variables. I have set JAVA_HOME to JDK installation path but no luck. I have searched the whole web and know that other people have faced this but their solution isn't working for me. Any help would be really appreciated !
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
FYR, my maven version output.
root#zarvis:~# mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T17:27:37+05:30)
Maven home: /usr/local/apache-maven-3.3.3
Java version: 1.7.0_101, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.19.0-31-generic", arch: "amd64", family: "unix"
JAVA_HOME is set but not sure why maven appends it with JRE.
root#zarvis:~# echo $JAVA_HOME
/usr/lib/jvm/java-1.7.0-openjdk-amd64
Thanks in advance !
Try adding JDK_HOME to your path
I want to replace BoneCP with HikariPC. Downloaded tar.gz from here and extracted. I don't know if this is a right command but inside hikaricp-java6 directory I run
$ mvn clean compile assembly:single
maven prints error
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/gkiko/Downloads/brettwooldridge-HikariCP-5cb1000/hikaricp-java6/src/main/java/com/zaxxer/hikari/util/ConcurrentBag.java:[358,20] cannot find symbol
symbol : method hasQueuedPredecessors()
location: class com.zaxxer.hikari.util.ConcurrentBag.Synchronizer
[ERROR] /Users/gkiko/Downloads/brettwooldridge-HikariCP-5cb1000/hikaricp-java6/src/main/java/com/zaxxer/hikari/pool/HikariPool.java:[150,37] cannot find symbol
symbol : method setRemoveOnCancelPolicy(boolean)
location: class java.util.concurrent.ScheduledThreadPoolExecutor
[ERROR] /Users/gkiko/Downloads/brettwooldridge-HikariCP-5cb1000/hikaricp-java6/src/main/java/com/zaxxer/hikari/pool/HikariPool.java:[486,28] cannot find symbol
symbol : method abort(java.util.concurrent.ExecutorService)
location: interface com.zaxxer.hikari.proxy.IHikariConnectionProxy
[INFO] 3 errors
[INFO] ------------------------------------------
[INFO] -------------------------------------------------------
[INFO] BUILD FAILURE
maven version:
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T21:37:52+04:00)
Maven home: /usr/local/Cellar/maven/3.2.1/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.9.4", arch: "x86_64", family: "mac"
java version:
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Could you please tell me how to get jar file of HikariCP so I can add it to my java web app and use it with sqlite?
Java 8 is required to build HikariCP -- even the Java 6/7 compatible version. But you can download the JAR from the maven central repository here:
http://search.maven.org/#search%7Cga%7C1%7Chikaricp
Click on the 'jar' link for the HikariCP-java6 version 2.0.1 entry (second line).