-
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
Usage of DB2 XA Driver ends up with error com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][4.29.24] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError #22711
Comments
/cc @mswatosh |
When you're enabling XA, is it failing in native only or both in native and JVM? |
Thanks @gsmet for your support and sorry for not mentioning that point already. It fails with the same error as mentioned above both in the native and JVM modes. The error message in native mode though reads a bit different:
But as you see with the same values: |
The resource bundle issue will be a different issue that is native specific. @barreiro could you enlighten us on how Agroal is supposed to work with DB2 + XA? I'm not sure to understand why it tries to inject the URL in it. |
Because the Quarkus application has following in application.properties I think: So we also tried both
and
but this time Quarkus itself warns that it's ignoring them because it doesn't know them. It doesn't pass them to Agroal :( |
@yasserzamani you'll have to use That will be:
|
Thanks a lot @barreiro yes it worked |
@barreiro should we document it? |
Additionaly we had to set the driver type as well to make it work:
And I think the other issue is still the resource bundle problem to make it work natively as well. I used GraalVM agent to find out what else is still missing: https://www.graalvm.org/reference-manual/native-image/Agent/ See the attachment in case it should be of any help, and thanks for all your support so far. |
And just to emphasize the point that with applying those changes above (missings.txt) I was able to successfully run in native mode without any error. |
Now that the oracle extension works I gave it a try and now I am stuck in a similar error we used to have with DB2 by this ticket. Similar to the DB2 setup above following my setup for Oracle:
With this setup I get:
I looked into the decompiled code of
And with that I now get an additional warning for the
But as far as I see there is a |
hi @bvahdat , could you open a new issue for the Oracle XA problem and attach a reproducer please? Ideally one without Camel as that would help me a lot :) |
@Sanne from what I have seen, I think we will need adapters to properly instantiate the XA datasources. |
Back to this issue, reading the original stacktrace one can see this error reported as the cause: I don't have a Windows machine but a quick search finds this article: Could it be you've installed the wrong version of the driver? |
Thanks @Sanne for the follow up. At our end it all works as expected, see also this comment. So to summarize with the following setup and adjustments (according to
So I think at the Quarkus project side, we need some extra documentation about this as well as adjustments to the DB2 extension itself, so that bits given through |
Closing as it seems to be working now |
Describe the bug
Running on a Windows 10 64-bit using Quarkus
2.6.1.Final
following the relevant dependencies I have for connecting to a DB2 instance:The settings in
application.properties
are as the folloiwng:The value of
P82_URL
isjdbc:db2://<IP_ADDRESS>:446/<DATABASE_NAME>
.The application runs without any issue using this setup as one can see below (both in JVM as well as native mode):
Now if I ask for the XA driver using:
Then the application fails to load the XA driver with the following message on startup:
The file
C:\Program Files (x86)\IBM\SQLLIB\BIN\db2jcct2.dll
is existing on the machine. I have also WSL on the same machine. Again using plain JDBC driver works perfectly but switching to XA driver results in a similar error:The warning message at the very first begining seems to be from:
https://github.com/agroal/agroal/blob/master/agroal-pool/src/main/java/io/agroal/pool/util/PropertyInjector.java#L46
Any help is much appreciated.
cc: @gsmet @barreiro @aguibert
Expected behavior
I expect to see the XA Driver usage works the same as the JDBC driver.
Actual behavior
The usage of XA Driver fails.
How to Reproduce?
No response
Output of
uname -a
orver
MINGW64_NT-10.0-18363 XYZ 3.1.7-340.x86_64 2021-10-12 16:29 UTC x86_64 Msys
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.1.Final
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: