Java callout using an different version of a third party dependency than Apigee

Hello,

We would to create a JAVA callout using a different version of a third party library embedded into Apigee. This JAVA callout has to rely on JAR deploy at the envirnment level in our Apigee Private Cloud.

Is it possible to force the newer version to be loaded first and how ?

Thanks and regards,

Christophe

0 3 51
3 REPLIES 3

yes,

attach the dependency jar to the API proxy.  It will be preferred over any JAR in the Apigee package. 

In fact , this is the documented requirement for Java callouts. The doc for Apigee says you should attach your jars in this way, specifically for the reason you are dealing with - you want to control your dependencies.

Hello @dchiesa1,

Thank you for this confirmation ?

Are the environment jar's also preffered to the Apigee ones ?

We are using your Apigee-Java-Xslt and would like to upgrade the Saxon version. The jar being used in different JAVA Callouts in different Shared Flows, we uploaded it as an environment jar but are facing issue where the newer Saxon librairy does not seem to be used.

Thanks and regards,

Christophe


@ChristopheG wrote:

Are the environment jar's also preffered to the Apigee ones ?

Yes. The dependency resolution looks first to the proxy resources, then to the environment-scoped resources.

We are using your Apigee-Java-Xslt and would like to upgrade the Saxon version. The jar being used in different JAVA Callouts in different Shared Flows, we uploaded it as an environment jar but are facing issue where the newer Saxon librairy does not seem to be used

Hmm, that's unexpected. re: "does not seem to be used", can you explain how you reach this conclusion? Whatr are you observing? Did you undeploy/redeploy the api proxy after uploading the jar to the environment? Have you tried this with other JARs - like your own jar?