Repository navigation
How to change some Jar version in Keycloak Quarkus #16409
Unanswered
ajaiswal595
asked this question in
Q&A
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to change mysql.mysql-connector-java-8.0.30.jar to mysql-connector-java-5.1.47.jar
So I deleted mysql.mysql-connector-java-8.0.30.jar from keycloak-20.0.1\lib\lib\main and placed mysql-connector-java-5.1.47.jar
When I started Keycloak I got the error
ERROR: Failed to run 'build' command. ERROR: java.lang.IllegalArgumentException: E:\keycloak-20.0.1\lib\lib\main\mysql.mysql-connector-java-8.0.30.jar does not exist ERROR: E:\keycloak-20.0.1\lib\lib\main\main\mysql.mysql-connector-java-8.0.30.jar does not exist ERROR: E:\keycloak-20.0.1\lib\lib\main\mysql.mysql-connector-java-8.0.30.jar For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.Also, in the future, if we get a vulnerability in some jar and the solution is to upgrade that jar, how do we achieve that?
As It is looking for a specific jar to be available in the lib folder it will not let us change any jar.
All reactions
Replies: 5 comments · 7 replies
Uh oh!
There was an error while loading. Please reload this page.
@sschu @pedroigor any solution for this?
All reactions
Uh oh!
There was an error while loading. Please reload this page.
I think it is very unlikely that a different major version is actually compatible, at least if semantic versioning is used. So I don't think what you are trying to do works. For minor or patch version changes, it probably does work. However, I don't know if it is possible to just do it in the provided distribution. You can definitely do it by building your own distribution with fixed versions of dependencies (and ideally provide a PR to also update upstream).
All reactions
Uh oh!
There was an error while loading. Please reload this page.
We are working on an installer tool to allow you to create your own distribution by removing and adding Quarkus dependencies and replacing dependencies.
We are not 100% sure yet how replacing dependencies will work without impacting supportability.
In your case, it works if you keep the same file name when replacing but the results are completely unexpected as those are the versions we support.
All reactions
Uh oh!
There was an error while loading. Please reload this page.
@nehachopra27 @alexeykazakov ^
All reactions
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
If I change mysql-jdbc.version to 8.0.31 then my builds fails
I see lib/lib/main/
So I'm trying to change the version of MySQL-connector
Build fails,
I just tried to change the latest version of mysql connector from 8.0.30 to 8.0.31
Where do we need to change the version of Jars?
All reactions
Uh oh!
There was an error while loading. Please reload this page.
Can we make a step back and understand first why you need to change the driver version?
All reactions
Uh oh!
There was an error while loading. Please reload this page.
Try replacing the JAR by keeping the same name. But if the version is not compatible with the
quarkus-jdbc-mysqlyou might have issues.As I mentioned before, we are working to improve this kind of patching and how to properly handle CVEs in dependencies. Right now, updates to dependencies only in new releases.
All reactions
Uh oh!
There was an error while loading. Please reload this page.
On the same line here I'm not talking about the provider
Is there any option that we can load our custom jar (Like some utility) by setting the classpath in Quarkus/Keycloak?
All reactions
Uh oh!
There was an error while loading. Please reload this page.
There isn't. The only way to include JARs in the classpath (a flatclasspath btw) is droping JARs to
providersdir.All reactions
Uh oh!
There was an error while loading. Please reload this page.
Actually these days we identified vulnerabilities in sankeyml, undertow, logmanager as it is very tight coupled with quarkus and *.dat file we can not delete those jars and put them into the provider.
I'm hoping for some kind of tool that can modify the .dat file based on the provided jar version.
All reactions
Uh oh!
There was an error while loading. Please reload this page.
#16517
All reactions