Dears,
I am following the native image build tutorial by quarkus to create native graalvm but i am getting the below error :
Error: No main manifest attribute, in /home/docker/workspace/quarkus/quarkus-getting-started/target/quarkus-getting-started-1.0-SNAPSHOT-runner.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.056 s
[INFO] Finished at: 2019-03-14T11:26:12+04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.11.0:native-image (default) on project quarkus-getting-started: Failed to generate a native image: Failed to build native image: Image generation failed -> [Help 1]
my environment :
OS : CentOS 7
Quarkus : 0.11.0
Java : Open JDK 1.8.0_181
GraalVM : 1.0.0-rc13
Using quarkus there is no main method in your app, but how to make it working using graal native image ?
The code 137 meant for me that I didn't have enough memory available for my docker image.
Try increasing the memory in your docker preferences. I set it to 10G to be sure because sometimes my build broke or took forever.
Why don't you use the latest Quarkus version 1.4.2.Final which come with it's own Docker image.
You can use the following properties to further config your memory consumption and your GraalVM image.
<quarkus.native.builder-image>quay.io/quarkus/ubi-quarkus-native-image:20.0.0-java11</quarkus.native.builder-image>-->
<quarkus.native.native-image-xmx>8192m</quarkus.native.native-image-xmx>
The first one could help you use another GraalVM image that the default one.
The second one could help you improve your build time. Pay attention it has to be less than the memory you set in your docker daemon.
Related
Thx to Steve for the CN1 ant to maven migration tool and video here. - Has anyone been able to run the Kitchen Sink project in Netbeans after migration? I follow the video instructions with the migration tool and migrate successfully and it runs from command line with ./run.sh but when I go to run it in NetBeans, I had a lot of 501 (https needed) errors. Added umer's code from here and that solved the 501 errors but now get:
Invalid POM for com.codenameone:codenameone-javase:jar:7.0.23, and
No implementation for org.codehaus.plexus.languages.java.jpms.LocationManager was bound.
while locating org.apache.maven.plugin.surefire.SurefirePlugin.
Note invalid POM warning...
------------------------------------------------------------------------
Building kitchensink-common 1.0-SNAPSHOT
------------------------------------------------------------------------
--- properties-maven-plugin:1.0.0:read-project-properties (default) # kitchensink-common ---
--- codenameone-maven-plugin:7.0.23:generate-gui-sources (generate-gui-sources) # kitchensink-common ---
The POM for com.codenameone:codenameone-javase:jar:7.0.23 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
Generating GUI sources
No GUI Entries available
Running from command line, invalid POM warning disappears:
[INFO] -----------< com.codename1.demos.kitchen:kitchensink-common >-----------
[INFO] Building kitchensink-common 1.0-SNAPSHOT [4/5]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- properties-maven-plugin:1.0.0:read-project-properties (default) # kitchensink-common ---
[INFO]
[INFO] --- codenameone-maven-plugin:7.0.23:generate-gui-sources (generate-gui-sources) # kitchensink-common ---
Generating GUI sources
No GUI Entries available
Running on apache-maven-3.8.1 on MacOSX
Java version: 1.8.0_172
Suggestions welcomed.
Thx, Mike
I think perhaps the method I'm using to detect the latest version of cn1 has issues. It picked 7.0.23 which was released this morning. But then it was unable to find some of the jars.
Probably it will work if you just try running the project again as it should be fully propagated to maven central now.
Problem was solved updating from Netbeans 8.2 to latest Netbeans version (currently 12.3).
I'm trying to follow this jenkins tutorial:
https://www.youtube.com/watch?v=FonVQNqLWiE&list=PL6tu16kXT9PqIe2b0BGul-cXbmwGt7Ihw&index=7
but I'm trying to do that within a dockerized jenkins. To do so, instead of creating a windows virtual machine, I just run the official jenkins docker image:
$ docker pull jenkins/jenkins:lts
$ docker run -P jenkins/jenkins:lts
To follow it up to chapter #6, to make sure maven is available I enter into the container with this:
$ docker exec -it -u root amazing_bose bash
(amazing_bose is the random name that docker assigned to the machine) and then, inside it I do:
# apt-get update
# apt-get install maven
# which mvn
/usr/bin/mvn
# mvn --version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_232, vendor: Oracle Corporation
Java home: /usr/local/openjdk-8/jre
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.9.184-linuxkit", arch: "amd64", family: "unix"
Build success
Until chapter #6 everything has worked fine. The repository is https://github.com/executeautomation/cucumberbasic and the compilation result in the docker's jenkins' console ends with:
Downloaded: https://repo.maven.apache.org/maven2/com/google/collections/google-collections/1.0/google-collections-1.0.jar (625 KB at 884.7 KB/sec)
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /var/jenkins_home/workspace/TestJenkinsXavi/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.532 s
[INFO] Finished at: 2019-11-15T12:40:01+00:00
[INFO] Final Memory: 17M/115M
[INFO] ------------------------------------------------------------------------
Finished: SUCCESS
Build failure
Instead, in chapter #7, it proposes to build the verify maven target for this other project: https://github.com/executeautomation/SeleniumWithCucucumber
In here, in the video tutorial it successfully compiles, but when I do it I get this console ending:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.197 s
[INFO] Finished at: 2019-11-18T08:15:03+00:00
[INFO] Final Memory: 17M/160M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project CucumberBasics: Compilation failure: Compilation failure:
[ERROR] /var/jenkins_home/workspace/TestJenkinsXavi/src/main/java/com/ea/Main.java:[73,61] lambda expressions are not supported in -source 1.5
[ERROR] (use -source 8 or higher to enable lambda expressions)
[ERROR] /var/jenkins_home/workspace/TestJenkinsXavi/src/main/java/com/ea/Main.java:[118,50] method references are not supported in -source 1.5
[ERROR] (use -source 8 or higher to enable method references)
[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/MojoFailureException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
Question
So the question is:
As it is a closed container (jenkins/jenkins:lts) and it's a source code that is not mine (it's from the tutorial's author) I wonder what do I have to do to make it compile the verify target.
The solution is to specify the source and target JDK levels on the Maven invocation:
-Dmaven.compiler.source=8 -Dmaven.compiler.target=8
In Jenkins, click the "Advanced" button for the Maven build and add these options to the line labelled "MAVEN_OPTS".
Your build fails with
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project CucumberBasics: Compilation failure: Compilation failure:
[ERROR] /var/jenkins_home/workspace/TestJenkinsXavi/src/main/java/com/ea/Main.java:[73,61] lambda expressions are not supported in -source 1.5
[ERROR] (use -source 8 or higher to enable lambda expressions)
I assume your code has lambda functions in there. Try to execute your build with the -source 8 flag as specified in the log. That should fix the issue or at least give you the next issue to work on.
I receive error Dependency META-INF/lib/bcel-findbugs-6.0.jar can not be found in sonar-findbugs-plugin-3.0.jar during build on jenkins for all projects using sonarqube:
[INFO]
[INFO] --- sonar-maven-plugin:2.4:sonar (default-cli) # tig-parent ---
[INFO] SonarQube version: 4.4
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /opt/jenkins/workspace/TIG nightly sonar/target/sonar
INFO: SonarQube Server 4.4
[INFO] [16:54:50.855] Load global settings
[INFO] [16:54:51.042] User cache: /var/run/tomcat/jenkins-master-dev.mycompany.com_00/.sonar/cache
[INFO] [16:54:51.055] Install plugins
[ERROR] Dependency META-INF/lib/bcel-findbugs-6.0.jar can not be found in sonar-findbugs-plugin-3.0.jar`
I am not aware of any changes in project sonar configuration, jenkins or sonarqube server. I checked that sonar-findbugs-plugin-3.0.jar plugin contains bcel-findbugs-6.0.jar library. I reinstalled the findbugs plugin without effect.
. You mean that it did work before but it does not work anymore?
. When you say that you are not aware of any changes in configuration, you mean there has not been any upgrade of software?
. No modification in your environment (Java version, path, etc.)
The solution was to delete sonar cache: /var/run/tomcat/jenkins-master-dev.mycompany.com_00/.sonar/cache
I'm following these instruction for setting up Apache Bigtop, to eventually support me running Oozie. I'm trying to use Bigtop because the Oozie website recommends the use of Bigtop if I want to run my Oozie install on Hadoop 2+.
After running the step
make hadoop-deb
I get the following error message (full message HERE):
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary: [INFO] [INFO] Apache Hadoop Main ................................ FAILURE [1:50.288s] [INFO] Apache Hadoop Project POM ......................... SKIPPED ... ... ...
...
...
...
...
...
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:55.412s
[INFO] Finished at: Mon Sep 15 14:14:17 PDT 2014
[INFO] Final Memory: 71M/434M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:stage (default-cli) on project hadoop-main: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.3:stage failed: A required class was missing while executing org.apache.maven.plugins:maven-site-plugin:3.3:stage: org/apache/commons/lang/StringUtils
Scouring the web, some people say this can be fixed by manually deleting your /.m2 repo and then rebuilding. I've tried this to no avail.
I'm using Ubuntu 14.04, fully updated, with Java openjdk7. The only different between what I did and the instructions was that I have Maven installed directly from apt-get, and thus I replaced the MAVEN_HOME location the instructions use with my own.
This info might also be helpful...
mherbst#Oozing:~/bigtop$ mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_65, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-35-generic", arch: "amd64", family: "unix"
Any ideas what might be the issue? I realize I'm using a slightly newer version of Ubuntu than when the guide was written, but I don't think that's the problem. This seems to be some type of Java/Maven dependency issue.
Where are you getting your BigTop installation instructions? I don't remember running maven as part of the install.
BigTop doesn't work on Ubuntu 14.04. There's a problem with at least one dependency (fuse-utils). Try Ubuntu 12.02 LTS.
I have some error message on some my Jenkins builds
ERROR: Could not find local repository for 2.0.8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Mon Jun 17 09:16:50 CEST 2013
[INFO] Final Memory: 29M/281M
[INFO] ------------------------------------------------------------------------
I search for the error message but Google cannot find any item for the following search: maven "Could not find local repository for"
Without the quotes there is a lot of answer but I could not find a relevant one. The log appears only on 2.x builds, maven 3.x seems immune to this. I suspect that the source of the error is that I'm using several versions of maven on the same environment (the version are : 2.0.8, 2.2.1, 3.0.4).
There's no answer probably because nothing seems broken: the artifact is correctly installed in the local maven repository.
But, in my humble opinion, a log with a ERROR level must be fixed.
Edit: the issue remains in Jenkins version 1.560.
Check bug #18441. It was supposedly fixed in Jenkins 1.509.4 (2013/10/09) release.
http://jenkins-ci.org/changelog-stable
I say supposedly because we're still encountering it.