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

package exe file is reporting version error #37744

Closed
jerry3323 opened this issue Dec 14, 2023 · 9 comments
Closed

package exe file is reporting version error #37744

jerry3323 opened this issue Dec 14, 2023 · 9 comments
Labels
area/native-image env/windows Impacts Windows machines kind/bug Something isn't working triage/needs-feedback We are waiting for feedback.

Comments

@jerry3323
Copy link

jerry3323 commented Dec 14, 2023

Describe the bug

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.6.3:build (default) on project demo1: Failed to build quarkus application: io.quarkus.builder.BuildException:
 Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to get GraalVM version
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:40)
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:217)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
[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/MojoExecutionException
Active code page: 65001
PS C:\Users\Administrator\Desktop\jmdns\demo1> ./mvnw package -Dnative
Active code page: 65001
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------------< com.example:demo1 >--------------------------
[INFO] Building demo1 1.0-SNAPSHOT                                             
[INFO]   from pom.xml                                                          
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ demo1 ---
[INFO] Copying 2 resources from src\main\resources to target\classes
[INFO]
[INFO] --- quarkus:3.6.3:generate-code (default) @ demo1 ---
[INFO] 
[INFO] --- compiler:3.11.0:compile (default-compile) @ demo1 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- quarkus:3.6.3:generate-code-tests (default) @ demo1 ---
[INFO] 
[INFO] --- resources:3.3.1:testResources (default-testResources) @ demo1 ---
[INFO] skip non existing resourceDirectory C:\Users\Administrator\Desktop\jmdns\demo1\src\test\resources
[INFO]
[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ demo1 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- surefire:3.1.2:test (default-test) @ demo1 ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.example.ExampleResourceTest
2023-12-14 21:54:16,178 INFO  [io.quarkus] (main) demo1 1.0-SNAPSHOT on JVM (powered by Quarkus 3.6.3) started in 1.787s. Listening on: http://localhost:8081
2023-12-14 21:54:16,181 INFO  [io.quarkus] (main) Profile test activated. 
2023-12-14 21:54:16,181 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.402 s -- in com.example.ExampleResourceTest
2023-12-14 21:54:17,261 INFO  [io.quarkus] (main) demo1 stopped in 0.052s
[INFO] 
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[WARNING] Corrupted channel by directly writing to native stream in forked JVM 1. See FAQ web page and the dump file C:\Users\Administrator\Desktop\jmdns\demo1\target\surefire-reports
\2023-12-14T21-54-13_016-jvmRun1.dumpstream
[INFO]
[INFO] --- jar:3.3.0:jar (default-jar) @ demo1 ---
[INFO] 
[INFO] --- quarkus:3.6.3:build (default) @ demo1 ---
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: C:\Users\Administrator\Desktop\jmdns\demo1\target\demo1-1.0-SNAPSHOT-native-image-source-
jar\demo1-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from C:\Users\Administrator\Desktop\jmdns\demo1\target\demo1-1.0-SNAPSHOT-native-image-source-jar\d
emo1-1.0-SNAPSHOT-runner.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15.275 s
[INFO] Finished at: 2023-12-14T21:54:24+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.6.3:build (default) on project demo1: Failed to build quarkus application: io.quarkus.builder.BuildException:
 Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to get GraalVM version
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:40)
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:217)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:842)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.lang.IllegalArgumentException: Cannot parse version from output:
[ERROR] Active code page: 65001
[ERROR]         at io.quarkus.deployment.pkg.steps.GraalVM$Version.of(GraalVM.java:281)
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildRunner.getGraalVMVersion(NativeImageBuildRunner.java:37)
[ERROR]         ... 12 more
[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/MojoExecutionException

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@jerry3323 jerry3323 added the kind/bug Something isn't working label Dec 14, 2023
@jerry3323
Copy link
Author

jerry3323 commented Dec 14, 2023

java version is

Active code page: 65001  native-image 17.0.9 2023-10-17
GraalVM Runtime Environment Oracle GraalVM 17.0.9+11.1 (build 17.0.9+11-LTS-jvmci-23.0-b21)
Substrate VM Oracle GraalVM 17.0.9+11.1 (build 17.0.9+11-LTS, serial gc, compressed references)

@jerry3323
Copy link
Author

quarkus version is 3.6.3

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 15, 2023

/cc @Karm (mandrel), @galderz (mandrel), @zakkak (mandrel,native-image)

@jerboaa
Copy link
Contributor

jerboaa commented Dec 15, 2023

Looks like a duplicate of #37651

@gsmet
Copy link
Member

gsmet commented Dec 15, 2023

@jerboaa not sure about this as I backported the fix ^ in 3.6.3 and the OP says they are using 3.6.3.

@jerboaa
Copy link
Contributor

jerboaa commented Dec 15, 2023

@gsmet The version seems to be some GraalVM EE thing:

native-image 17.0.9 2023-10-17
GraalVM Runtime Environment Oracle GraalVM 17.0.9+11.1 (build 17.0.9+11-LTS-jvmci-23.0-b21)
Substrate VM Oracle GraalVM 17.0.9+11.1 (build 17.0.9+11-LTS, serial gc, compressed references)

Which I thought was addressed in:
https://github.com/quarkusio/quarkus/pull/37651/files#diff-051cb47b90d1d76cca2441db9dca7a399e3f755a1a668463119bef7871b5d057R145-R148

But it could very well be that this Active code page: 65001 output is confusing it. So NVM me.

@zakkak
Copy link
Contributor

zakkak commented Dec 18, 2023

But it could very well be that this Active code page: 65001 output is confusing it. So NVM me.

It looks like that's exactly the root of the issue:

[ERROR] Caused by: java.lang.IllegalArgumentException: Cannot parse version from output:
[ERROR] Active code page: 65001

@jerry3323 it looks like a local configuration/script issue. Although I have no experience with this kind of issue myself I suggest having a look at https://stackoverflow.com/questions/48183570/how-to-fix-windows-batch-file-for-command-returing-active-code-page-65001 and giving the suggestions there a try.

@zakkak zakkak added the env/windows Impacts Windows machines label Dec 18, 2023
@geoand
Copy link
Contributor

geoand commented May 17, 2024

Is this still an issue?

@geoand geoand added the triage/needs-feedback We are waiting for feedback. label May 17, 2024
@geoand
Copy link
Contributor

geoand commented May 28, 2024

Closing for the lack of feedback

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image env/windows Impacts Windows machines kind/bug Something isn't working triage/needs-feedback We are waiting for feedback.
Projects
None yet
Development

No branches or pull requests

5 participants