oci-java-sdk
oci-java-sdk copied to clipboard
Request to upgrade to Jakarta RESTful Web Service 3.0.0
Jakarta has released a new version of RESTful Web Services, i.e. 3.0.0
. Please upgrade to this version so that consumer teams can upgrade without any compatibility issues. There are package structure changes from 2.1.6
to 3.0.0
that prevent us from using the latest oci-java-sdk
with the latest Jakarta RESTful Web Services
.
Thanks for reporting - we'll take a look
I have a little example that successfully uses the OCI Java SDK (with shaded Jakarta 2) and then uses Jakarta 3.0.0 and Jersey 3.0.4 to make an HTTP request.
See here: oci-java-sdk-shaded-with-jakarta3.zip
@vikulaggarwal , @barchetta , please take a look if that could be a viable work-around.
I looked in the zip file, but didn't see any of the actual shaded code (I might have overlooked it). I saw reference to an artifact that maybe you built locally? but is not in Maven central (or at least is not visible in the search portal).
My question that is related to all this is: suppose I wanted to do something fancy with, say, JaxRsCircuitBreaker
(one arbitrary example where the Jersey machinery is "exposed" in the public OCI SDK; see its decorateFunction
method and note the javax.ws.rs....
in the signature). How does the shaded code deal with this without breaking backwards compatibility? Or are you saying that it's good enough for simple use cases for now?
Hi @ljnelson , my apologies, we don't publicly release the shaded jars on MavenCentral.
It is included in the release zip files, though. For example, release 2.21.0 contains a shaded/lib/oci-java-sdk-full-shaded-2.21.0.jar
file.
If you use that jar file and install it in your local maven repository, then you will be able to test this work-around:
For installation instructions, see https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html
mvn install:install-file -Dfile=/path/to/downloaded/oci-java-sdk-full-shaded-2.21.0.jar -DgroupId=com.oracle.oci.sdk -DartifactId=oci-java-sdk-shaded-full -Dversion=2.21.0 -Dpackaging=jar
will cause this dependency to work:
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-shaded-full</artifactId>
<version>2.20.0</version>
</dependency>
If this helps you, we can certainly release the shaded jar on MavenCentral as well. Please let us know if this moves us in the right direction, and thank you for your help and patience.
I have been able to use the shaded jar as a workaround for some simple use cases, but have not strayed much off the beaten path so I'm not sure yet if it will work fully. But it does appear to work for simple stuff.
It has substantially increased the size of my project, since I was able to pick and choose dependencies but here I have to use a 96 MB jar instead.
I never like throwing tomatoes, and I do understand this is a kludgy workaround, as you've indicated, so: thank you.
It would indeed be helpful at the very least to have this released in Maven central so that I don't have to instruct users how to download it, bork around with their Maven repositories, etc. etc.
(Even better, of course, if shading cannot be avoided, would be to shade all the individual libraries with new classifiers and appropriate classifier-bearing dependencies so that I could continue to do what I was doing before.
For example, perhaps if I were currently depending on bmc-common
and no classifier I could instead depend on a shaded bmc-common
with a classifier of jakarta
. And then if perhaps I were currently depending on bmc-ailanguage
, which of course transitively depends on bmc-common
, then perhaps instead I could depend on an artifact named bmc-ailanguage
with a classifier of jakarta
, that would transitively depend on bmc-common:jar:jakarta
. Then I could keep doing what I was doing before with a simple classifier change and no need to bring in a katrillion megabytes of stuff I'm never going to use.)
I have to assume that would not be much of an enormous issue since this is all presumably automated somewhere anyhow, but perhaps I'm missing something.
(I will also say that I expect that I'm sort of the tip of the iceberg since Jakartafication™ will come to get us all some day. 😄 )
Just a gentle ping @mricken that releasing the shaded jar into Maven Central would really help me out.
I see that 2.32.0 is out without the shaded jar so I guess it didn't get released. I'll file another issue for greater visibility.
I'm in the process of migrating to Helidon MP 3.0.0 and our project uses OCI Java SDK. Currently the fact that OCI Java SDK doesn't have a version that properly deals with the javax=>jakarta change, results in an integration which for us is not production ready. Two main reasons are that:
- we have to jump through way too many hoops to make the integration work at all
- the resulting microservice image, is far from micro - becausing of the shading work around.
Bottom-line is that we cannot migrate properly to Helidon MP 3.0.0 as of yet. Can you please provide a timeline as to when you guys think this is resolved, so we can properly plan our work. Thanks.
Just to give an idea. These are the two biggest libraries of one of our services that uses OCI SDK Object Storage. You can see that the footprint of the binary is disproportionately influenced now by OCI SDK Java shading approach.
Is it possible to get an update about this? Thank you!
Hi, we just released OCI Java SDK 3.0.0-beta1
yesterday: https://github.com/oracle/oci-java-sdk/releases/tag/v3.0.0-beta1
One of the key changes in this version is that you can choose Jakarta EE 8/Jersey 2 or Jakarta EE 9/Jersey 3 as HTTP client.
To choose Jakarta EE 9/Jersey 3, please follow this example: https://github.com/oracle/oci-java-sdk/blob/master/bmc-other-examples/bmc-jersey3-examples/pom.xml#L96-L99
Please let us know if you run into any issues with choosing the HTTP client in 3.x.y
, or with the new 3.x.y
version in general.
If you do have problems that prevent you from using 3.x.y
, please be advised that we'll continue to release 2.x.y
versions for half a year:
- https://github.com/oracle/oci-java-sdk/tree/legacy/v2/master
- https://github.com/oracle/oci-java-sdk/releases/tag/v2.47.0
We released version 3.0.0
on November 8, 2022: https://github.com/oracle/oci-java-sdk/releases/tag/v3.0.0
Just like the aforementioned beta, this version allows you to choose Jersey 2 or Jersey 3 as HTTP client. I'm closing this issue, since the request has been fulfilled.
If there is a problem that prevents you from using 3.x.y or selecting Jersey 3, please let us know. Thanks!