- Notifications
You must be signed in to change notification settings - Fork 79
Description
Before reporting
- This repository should be used to report issues on the Maven or Gradle plugins for GraalVM.
- Please report issues which are specific to the Spring Framework or the Micronaut framework to their specific repositories.
- Do not report issues with building your specific application, e.g errors which happen at image build time like classes initialized at build time, or missing classes as run time: those are not related to the plugins but problems with configuration. You can refer to the GraalVM native image documentation for available options and the plugins documentation for how to use them with the plugin.
Describe the bug
A clear and concise description of what the bug is.
Make sure that you have read the documentation and that you are using the latest plugin version.
- For Maven Plugin 0.9.20, the
native:metadata-copytask cannot be executed normally. Although there is no error in the log, the final json file is not output to the customoutputDirectory. 
To Reproduce
When possible, provide a link to a repository which reproduces the issue, with instructions on how to use.
The reproducer must make use of either the Maven or Gradle plugin.
Steps to reproduce the behavior:
- Minimal reproducible unit tests and steps to reproduce are at https://github.com/linghengqian/maven-v0920-metadatacopy-test .
sudo apt install unzip zip curl sed -y curl -s "https://get.sdkman.io" | bash source "$HOME/.sdkman/bin/sdkman-init.sh" sdk install java 22.3.1.r17-grl sdk use java 22.3.1.r17-grl gu install native-image sudo apt-get install build-essential libz-dev zlib1g-dev -y git clone git@github.com:linghengqian/maven-v0920-metadatacopy-test.git cd ./maven-v0920-metadatacopy-test/ ./mvnw -Pnative -Dagent=true clean test native:metadata-copyPlease use backticks to properly format code.
If possible please attach a complete reproducer here (either as a zip file or as a link to public repository/branch).
Expected behavior
A clear and concise description of what you expected to happen.
Logs
Add logs to help explain your problem.
Please use backticks to properly format big logs. Example:
[INFO] Scanning for projects... [INFO] Found GraalVM installation from JAVA_HOME variable. [INFO] [INFO] --------------< com.lingh:maven-v0920-metadatacopy-test >--------------- [INFO] Building maven-v0920-metadatacopy-test 1.0-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- clean:3.2.0:clean (default-clean) @ maven-v0920-metadatacopy-test --- [INFO] Deleting /home/linghengqian/TwinklingLiftWorks/git/public/maven-v0920-metadatacopy-test/target [INFO] [INFO] --- resources:3.3.0:resources (default-resources) @ maven-v0920-metadatacopy-test --- [INFO] skip non existing resourceDirectory /home/linghengqian/TwinklingLiftWorks/git/public/maven-v0920-metadatacopy-test/src/main/resources [INFO] [INFO] --- compiler:3.10.1:compile (default-compile) @ maven-v0920-metadatacopy-test --- [INFO] No sources to compile [INFO] [INFO] --- resources:3.3.0:testResources (default-testResources) @ maven-v0920-metadatacopy-test --- [INFO] Copying 1 resource [INFO] [INFO] --- compiler:3.10.1:testCompile (default-testCompile) @ maven-v0920-metadatacopy-test --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to /home/linghengqian/TwinklingLiftWorks/git/public/maven-v0920-metadatacopy-test/target/test-classes [INFO] [INFO] --- surefire:3.0.0-M8:test (default-test) @ maven-v0920-metadatacopy-test --- [WARNING] Parameter 'systemProperties' is deprecated: Use systemPropertyVariables instead. [INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.shardingsphere.db.protocol.netty.ChannelAttrInitializerTest 15:55:12.115 [main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework 15:55:12.122 [main] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false 15:55:12.123 [main] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 17 15:55:12.124 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available 15:55:12.124 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available 15:55:12.125 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.storeFence: available 15:55:12.126 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available 15:55:12.137 [main] DEBUG io.netty.util.internal.PlatformDependent0 - direct buffer constructor: unavailable: Unable to make private java.nio.DirectByteBuffer(long,int) accessible: module java.base does not "opens java.nio" to unnamed module @131276c2 15:55:12.139 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: unavailable, true, Unable to make static boolean java.nio.Bits.unaligned() accessible: module java.base does not "opens java.nio" to unnamed module @131276c2 15:55:12.140 [main] DEBUG io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable: class io.netty.util.internal.PlatformDependent0$7 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @131276c2 15:55:12.141 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): unavailable 15:55:12.142 [main] DEBUG io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available 15:55:12.143 [main] DEBUG io.netty.util.internal.PlatformDependent - maxDirectMemory: 3401580544 bytes (maybe) 15:55:12.144 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: /tmp (java.io.tmpdir) 15:55:12.144 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model) 15:55:12.145 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: -1 bytes 15:55:12.145 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1 15:55:12.147 [main] DEBUG io.netty.util.internal.CleanerJava9 - java.nio.ByteBuffer.cleaner(): available 15:55:12.150 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.582 s - in org.apache.shardingsphere.db.protocol.netty.ChannelAttrInitializerTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- native:0.9.20:metadata-copy (default-cli) @ maven-v0920-metadatacopy-test --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.028 s [INFO] Finished at: 2023-02-16T15:55:12+08:00 [INFO] ------------------------------------------------------------------------System Info (please complete the following information):
- OS: [e.g.
Windows]Linux - GraalVM Version [e.g.
22.0 CE]22.3.1 CE - Java Version [e.g.
17]17 - Plugin version [e.g.
native-gradle-plugin:0.9.10]native-maven-plugin:0.9.20
Additional context
Add any other context about the problem here.
- Early exploration via Make ShardingSphere Proxy in GraalVM Native Image form available apache/shardingsphere#21347 .