Failed to generate a native image: GRAALVM_HOME was not set (MacOsx)
I have set the classpath, running the set command gives me,
GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-19.0.0/contents/home. java -version points to OpenJDK GraalVM CE 19.0.0...
I was expecting to successfully build native quarkus images
I was able to resolve this, thanks to Marcus Biel, Quarkus is not ready for Java 11, So I pointed JAVA_HOME to java8, so I set up an alias to enable easy switching between J8 and J11 as it may be required in different projects.
Related
I have a Java 8 Spring Boot app that is deployed to Google App Engine and being built via GCP CloudBuild. I am trying to upgrade it from Java 8 to Java 11.
In the cloudbuild.yaml file, I changed:
- id: 'Build and Test'
name: 'gcr.io/cloud-builders/mvn:3.5.0-jdk-8'
args: ['package', 'appengine:stage']
to:
- id: 'Build and Test'
name: 'maven:3.8.3-jdk-11'
args: ['package', 'appengine:stage']
When I run the CloudBuild, this step now suddenly fails with the following error:
docker.io/library/maven:3.8.3-jdk-11
/usr/local/bin/mvn-entrypoint.sh: 50: exec: package: not found
In its previous configuration, it was running just fine. The entire cloudbuild.yaml file is:
steps:
- id: 'copy file'
name: 'ubuntu'
args: ['cp', 'src/main/appengine/app.yaml', src/main/appengine/app.yaml]
- id: 'Build and Test'
name: 'maven:3.8.3-jdk-11'
args: ['package', 'appengine:stage']
What is going on here? Does the gcr.io/cloud-builders/mvn:3.5.0-jdk-8 image somehow understand mvn package appengine:stage, whereas the maven:3.8.3-jdk-11 image doesn't? Mainly I just need someone to help me understand why I'm getting the error. If anyone could also lend some suggestions for how to fix or circumvent it, that'd be greatly appreciated as well. Thanks in advance!
Reviewing Google documentation about migrating to the Java 11 runtime, I found that App Engine standard environment allows you to use several of App Engine's packaged services and APIs in the Java 11 runtime, reducing runtime conversion effort and complexity.
The Project Engine API JAR allows your Java 11 app to contact the bundled services APIs and access most of the same functionality as the Java 8 runtime.
You can also use Google Cloud products that are equivalent to the App Engine packaged services in functionality.
Adding overview of the migration process documentation.
The process to follow is:
Download Cloud SDK.
Migrate from the standalone App Engine Maven plugin to the Cloud
SDK-based Maven plugin or the Cloud SDK-based Gradle plugin.
Install the App Engine API JAR if you are using the App Engine
bundled services.
Migrate your XML files to the equivalent yaml files.
Now, regarding the issue you are getting, you should specify the whole path of the script because /usr/src/app may not be in your path. You must also ensure that your entrypoint.sh is executable; however, depending on your circumstance, docker will duplicate the permissions precisely as they are on your build host, so this step may not be necessary.
Additional suggestion is that you can't use single quotes ' for the entrypoint/command, you can try with “,
It was so obvious in hindsight. I needed to specify mvn as the entrypoint command in the step like so:
- id: 'Build and Test'
entrypoint: mvn
name: 'maven:3.8.3.0-jdk-11'
args: ['package','appengine:stage']
I am trying to migrate a huge project having visual studio and maven projects to bazel. I need to access our in house maven server which is encrypted. To get access I need the load the maven_jar skylark extension since the default impl does not support encryption (get error 401). using the extension leads to a lot of troubles, like:
ERROR: BUILD:4:1: no such package '#org_bouncycastle_bcpkix_jdk15on//jar': Traceback (most recent call last):
File ".../external/bazel_tools/tools/build_defs/repo/maven_rules.bzl", line 280
_maven_artifact_impl(ctx, "jar", _maven_jar_build_file_te...)
File ".../external/bazel_tools/tools/build_defs/repo/maven_rules.bzl", line 248, in _maven_artifact_impl
fail(("%s: Failed to create dirs in e...))
org_bouncycastle_bcpkix_jdk15on: Failed to create dirs in execution root.
The main issue seems to be the shell that needs to be provided to bazel in BAZEL_SH environment variables:
I am working under windows
I am using bazel 0.23.2
bazel seems to run a bash command using "bash" directly and not the one provided by env variable.
I got a ubuntu shell installed in windows. bazel was using everything from ubuntu, especially when using maven (settings.xml was using from ubuntu ~/.m2 and not from windows user)
after uninstalling ubuntu and making sure that bash in a cmd ends up in "command not found" I also removed the BAZEL_SH env var and bazel throws the message above
after setting the BAZEL_SH variable again it fails with the same error message
I am assuming that bazel gets a bash from somewhere or is ignoring the env variable. My questions are:
1. How to setup a correct shell?
2. Is BAZEL_SH needed when using current version?
For me the doc at bazel website about setup is outdated.
Cheers
Please consider using rules_jvm_external to manage your Maven dependencies. It supports both Windows and private repositories using HTTP Basic Authentication.
For me the doc at bazel website about setup is outdated.
The Bazel team is aware of this and will be updating our docs shortly.
I am new to Grails and never made any project on it. I followed some tutorials and downloaded both Grails and JDK and set my environment variables exactly as specified, but when I tried to run the application, I got this error and my application is not running:
Error initializing classpath: could not determine java version from '10.0.2'
I just used CMD and none of the IDE is used, please help me solve this problem.
First check classpath of both for Java & Grails by running these command java -version & grails -version
If you found problem in classpath then solve by this way http://grails.asia/grails-tutorial-for-beginners-setup-your-windows-development-environment/
Although its better to use Java 8, not Java 10
In a new install, I'm getting the following warning on OSX 10.8.3, after installing and confirming that JAVA 7 is the default:
MacBook-Pro:neo4j-community-1.9 roy$ bin/neo4j start
WARNING! You are using an unsupported version of the Java runtime. Please use Oracle(R)
Java(TM) Runtime Environment 7.
Starting Neo4j Server...WARNING: not changing user
process [1959]... waiting for server to be ready.... OK.
Go to http://localhost:7474/webadmin/ for administration interface.
I am unable to CREATE nodes, or anything else at this time.
Any pointers most appreciated!
I faced the same problem. I edited the utils file in the bin folder of Neo4j by changing the JAVA_HOME to reflect the latest Java installed and the JAVACMD variable to $JAVA_HOME/Commands/java instead of $JAVA_HOME/bin/java. After this I no longer got the unsupported Java version warning.
Hi i'm trying to implement testlink plugin in jenkins.
I followed this tutorial http://tupilabs.com/books/jenkins-testlink-plugin-tutorial/en/book.pdf
I can build the project but the test isn't run.
there is a file not found error
I don't understand where i have to put my testfile. I supposed the output format must be TestNG, but where i have to put it ?
Thanks for your answer
I had exactly the same problem with building project, when I was following through tutorial placed in book Jenkins:The Definitive Guide.
I had Jenkis (jenkins-1.502.msi) instaled on Windows7 64 as a service - whatever I tried always received:
[workspace] $ mvn.bat
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn.bat" (in directory "C:\Work\jenkins\jobs\gameoflifedefault\workspace"): CreateProcess error=2, The system cannot find the file specified
Unfortunately I didn't managed to resolve this jenkis service problem but found another solution to make it work on Windows:
Use Apache Tomcat java server - if you have properly configured Tomcat do:
Download jenkins.war
Place it in webapps folder in your Tomcat directory
Run Tomcat and check via http://localhost:8080/manager if jenkins is there
Go to http://localhost:8080/jenkins
Now mvn.bat is seen and my build run without problems.
Ofcourse I understand that maven is properly configured on your system - so you should had specified in environmental variables:
variable: M2
value: %M2_HOME%\bin
variable: M2_HOME
value: C:\yourPathToMaven\apache-maven-3.0.4
variable: PATH
add to existing value: %M2_HOME%;
To check if maven is visible type in comand promp:
C:\Users\x>mvn --version
You should get something like:
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\Work\Maven\apache-maven-3.0.4
Java version: 1.7.0, vendor: Oracle Corporation
Java home: C:\Work\ja\jdk1.7.0_10\jre
Default locale: en_US, platform encoding: Cp1250
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Hope it helps.
Update : I found that the error was :
Cannot run program mvn.bat in directory d:/jenkins/jobs/JobTest/workspace CreateProcess error=2 File not found.
I made a free style project as said in the tutorial. It seems to be a maven error so i don't understand ...
If somebody can help me i'd be gratefull