-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Register Db2 resource bundle classes for reflection #46491
Conversation
Fixes quarkusio#46403 Co-Authored-By: Foivos Zakkak <[email protected]>
0525f0f
to
d5d09ba
Compare
This comment has been minimized.
This comment has been minimized.
@zakkak thanks! Believe it or not, I had no idea resource bundle classes were handled specifically, good to know. |
This comment has been minimized.
This comment has been minimized.
Ah wait before merging, I want to check if some of the stuff I added is still needed, it might not be. |
They are required so it's all good and ready to get merged. |
|
||
resource.produce(new NativeImageResourceBuildItem("pdq.properties")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, well, I had a look at the jar. But maybe they are actually checking for it as an app resource.
Will drop this commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed it's still needed:
com.oracle.svm.core.jdk.resources.MissingResourceRegistrationError: The program tried to access the resource at path
pdq.properties
without it being registered as reachable. Add it to the resource metadata to solve this problem. See https://www.graalvm.org/latest/reference-manual/native-image/metadata/#resources-and-resource-bundles for help
[email protected]/java.lang.ClassLoader.getResource(ClassLoader.java:1415)
com.ibm.db2.jcc.am.ao.b(ao.java:3175)
com.ibm.db2.jcc.DB2BaseDataSource.initializeDataSourceProxy(DB2BaseDataSource.java:14413)
com.ibm.db2.jcc.DB2SimpleDataSource.<init>(DB2SimpleDataSource.java:178)
com.ibm.db2.jcc.DB2Driver.getDataSource(DB2Driver.java:1049)
com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:435)
com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:117)
io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:225)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, well, I had a look at the jar. But maybe they are actually checking for it as an app resource.
Yes despite it not being present, if the code tries to access it we need to register it.
d5d09ba
to
3624040
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @gsmet
Status for workflow
|
Draft as it doesn't work but I thought some other people might want to play with it.
Fixes #46403