-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: java.lang.NullPointerException when using SQLite #22822
Comments
Interesting compilation failure, thanks for the report! I'll also mark this as an extension request, as we don't support SQLite currently. |
@sesponda could you briefly describe why you'd prefer to use SQLite rather than one of the already supported databases? That would help us triage and prioritize things: I know SQLite is pupular among Android developers but haven't seen much use (yet) among backend developers. |
I tried reproducing this outside of Quarkus (and without kotlin) without lack. import java.sql.DriverManager;
public class Main {
public static void main(String[] args) {
try {
Class.forName("org.sqlite.JDBC");
DriverManager.getConnection("jdbc:sqlite:./temp-db").createStatement();
System.out.println("SUCCESS");
} catch (Throwable t) {
System.out.println("FAILED");
}
}
} Compiles (using Examining the class initialization report I also see that Update: adding |
The project is a command-line tool that needs to process the output of a 3rd party app. Unfortunately, that output is an SQLite DB and I can't change this. I've applied your build options to my Quarkus project:
Considering we have a workaround (thanks, @zakkak) and that there is an upstream bug to track, I'm happy to close this ticket. Thank you for the prompt help. |
Correct, and that's even not always true. So if you are not hitting any memory limits you should be OK.
I would prefer keeping this open till the upstream issue is fixed and Quarkus defaults to a GraalVM version that includes that fix. |
@sesponda thanks for the context! |
@zakkak it seems like this issue has been fixed in GraalVM. Do you know if the fix is included in |
Yes, I confirm that the fix is included in 22.1. |
Thanks! |
Describe the bug
Native compilation of a very small Quarkus app using SQLite causes an NPE in
org.graalvm.compiler.java.BytecodeParser
(full stack trace visible in the logs).The bug report details are for Mac. I was also able to reproduce it using Linux (
Linux lubu2 5.4.0-92-generic #103-Ubuntu SMP Fri Nov 26 16:13:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
)Expected behavior
Native binary is built.
Actual behavior
NPE:
How to Reproduce?
./mvnw clean package -Pnative -Dquarkus.native.container-build=true
Note: using
-Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel:21.3-java11
also fails with the same NPE.Output of
uname -a
orver
Darwin C02DQ1BTMD6V 20.6.0 Darwin Kernel Version 20.6.0: Wed Nov 10 22:23:07 PST 2021; root:xnu-7195.141.14~1/RELEASE_X86_64 x86_64
Output of
java -version
java version "17.0.1" 2021-10-19 LTS Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39) Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
GraalVM version (if different from Java)
ubi-quarkus-mandrel:21.3-java11
Quarkus version or git rev
2.6.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: /Users/sesponda/.m2/wrapper/dists/apache-maven-3.8.4-bin/52ccbt68d252mdldqsfsn03jlf/apache-maven-3.8.4 Java version: 17.0.1, vendor: Oracle Corporation, runtime: /Users/sesponda/.sdkman/candidates/java/17.0.1-oracle Default locale: en_AU, platform encoding: UTF-8 OS name: "mac os x", version: "11.6.2", arch: "x86_64", family: "mac"
Additional information
No response
The text was updated successfully, but these errors were encountered: