-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Oracle JDBC extension in native mode doesn´t work with XA #23341
Comments
@Sanne is this part of the problems you're already trying to address in the Oracle JDBC driver? Or should I have a look? |
Hi everyone, I think I was able to fix it locally: https://github.com/bvahdat/code-with-quarkus3/pull/1/files My env is the following:
If you could confirm that the fix is also working in your env (locally or in a CI/CD pipeline), that would be really awesome. The reflection config could then probably be added to the corresponding quarkus extension ( P.S.
|
@Sanne ^ |
@progaddict sorry I missed this - crazy busy times :) Sounds promising, I'll have a look |
Any progress on this one? |
Hello. I am an architect with Group Charles André. We are facing that same issue except that we use PostreSQL instead of DB2. In the logs, I've found the "Invalid Oracle URL specified: OracleDataSource.makeURL" error and two warnings : I think that GraalVM native-image removes all methods from oracle.jdbc.datasource.impl.OracleDataSource and oracle.jdbc.xa.OracleXADataSource classes so I've put them back using the @RegisterForReflection annotation and now everything seems to work :
I kind of understand it's the Oracle JDBC Driver itself that has to be fixed but I do hope the Quarkus Team will find a Workdaround because we try to avoid deploying our apps with JVMs and most of our databases are Oracle ones. In the meantime, could someone tell me if my "@RegisterForReflection" solution can be used in production ? Regards |
Yes you can use your workaround. I think we already register the XA data source class when using XA but we might need to be more clever. I will have a look on Monday. |
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341
I was able to reproduce the issue and included the fix you put in place in the extension so once the fix got released, you won't need to do it yourself manually. See #40704 . |
@david-deck-gca Thanks for reviving this issue and providing your insights :) |
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341 (cherry picked from commit f69176f)
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341 (cherry picked from commit f69176f)
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341 (cherry picked from commit f69176f)
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341 (cherry picked from commit f69176f)
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341 (cherry picked from commit f69176f)
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341 (cherry picked from commit f69176f)
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341 (cherry picked from commit f69176f)
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341
We need to register a few more classes for reflection and also all their nested classes, which is why I use `@RegisterForReflection` instead of the usual build item. Fixes quarkusio#23341
Describe the bug
Using the provided reproducer below with enabled XA on this line I get the following error when accessing http://localhost:8080/hello:
And without XA (although
-H:+AddAllCharsets
per default is set):Expected behavior
I expect this extension to work properly the same way as in JVM mode.
Actual behavior
It fails in native mode both w/o XA.
How to Reproduce?
FOO_URL
(something likejdbc:oracle:thin:@10.251.242.211:15001:DB
), usernameFOO_USER
and passwordFOO_PASS
, all as ENV variables../mvnw package -Pnative
and then./target/code-with-quarkus-1.0.0-SNAPSHOT-runner
Output of
uname -a
orver
Linux XYZ 4.4.0-18362-Microsoft #1801-Microsoft Sat Sep 11 15:28:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "17.0.1" 2021-10-19 OpenJDK Runtime Environment GraalVM CE 21.3.0 (build 17.0.1+12-jvmci-21.3-b05) OpenJDK 64-Bit Server VM GraalVM CE 21.3.0 (build 17.0.1+12-jvmci-21.3-b05, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.3.Final (Also tried out 999-SNAPSHOT)
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: C:\Develop\apache-maven-3.8.4 Java version: 17.0.1, vendor: GraalVM Community, runtime: C:\Develop\graalvm-17 Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Additional information
No response
The text was updated successfully, but these errors were encountered: