Limitation in Java Callout in Apigee?

Not applicable

Is there any limitation for Java callout in Apigee (like number of jar file or size of jar etc). I am developing proxy to write data to AWS S3 bucket using java callout. However, sometime when I try to deploy getting following error -

	Error in deployment for environment digital-cloud-dev-external.
The revision is deployed, but traffic cannot flow. Failed to instantiate the JavaCallout Class com.apigee.aws.s3.S3BigdataIngestionCallout

Sometime it deploys successfully but the unable to access the proxy.

{ "fault": { "faultstring": "Unable to identify proxy for host: default and url: /test/aws/s3/poc/v1/create", "detail": { "errorcode": "messaging.adaptors.http.configuration.ApplicationNotFound" } } }

If I remove some jars the it deploys. However, those jars are required.

Note - We can't use nodejs for this as it is not approved by our organization.

0 7 1,417
7 REPLIES 7

Yes, there are limitations.

There is a bundle-size limitation, but that would be enforced at the time you import/deploy, and you should see a clear message. So I don't think you're experiencing that.

There is also a security policy set for Java callout classes. This is more likely what you are experiencing.

To change that, follow the advice in this other Q&A.

We have narrowed down the issue. The size of proxy is more than 4MB. If the size of the proxy is more than 4MB then the proxy is not getting deployed or if deployed we get ApplicationNotFound error.

This is how we figured out the issue.

We tried to implement same functionality using nodeJs. We ran into similar issue as java callout proxy. The size of the proxy was 4.5MB. And, the earlier proxy (java callout) was also more than 4MB.

Then we created new hello world java callout proxy. Now the proxy was deployed and was working as expected. We started adding more jar files (that are not required) into hello world java proxy. It worked till less than 4 MB size. Once the size crossed 4mb then the same issue repeated. Now we removed few jar files and reduced size to below 4mb (3.3mb) and proxy started working as expected.

We have two private cloud apigee setup. One is in on-premise and other one in AWS cloud. For both the instance management server is same. We are facing this issue only in AWS cloud instance. In on-premise the proxy is working fine.

As per apigee documentation (https://community.apigee.com/questions/10850/api-proxy-size-limitation.html) default proxy size is 15 mb and that is configured also same in below files.

thrift_framed_transport_size_in_mb cassandra.yaml and in conf/apigee/management-server/repository.properties

Is there any other setting that will restrict the size to 4MB?

An alternative approach to this we uploaded (imported) referenced java libraries to environment level. The import was successful, however the jar are not loading. We tried importing jar files to organization level but that also not loading. We restarted RMP nodes and Management Server. But the jars are not loading in proxy run time. Does any setting that we have to change to enable this?

Apigee Version is 4.16.05.02

Java version is 1.8.0_92

Not applicable

Update on this issue:

We imported dependency jars to environment level and restarted message processor and router service. The jars are loaded and proxy started working.

Also, we deployed proxy bundle with dependency jars in it (without importing jars to environmental level) to production AWS cloud planet and is working fine. There is no issue AWS production environment for deploying proxy with more than 4MB.

I think there is some setting or configuration (other than thrift_framed_transport_size_in_mb cassandra.yaml and in conf/apigee/management-server/repository.properties) that restricts from deploying proxy with size more than 4MB in AWS non prod region.

Let me know if any such configuration.

Hi Sujnana Rai

I have the same requirement.

Can you pls assist on the topic please?

Thank you,

Slobodanka

ylesyuk
Participant V

On each MS and CS nodes:

API proxy bundles cannot be larger than 15MB. In Apigee Edge for Private Cloud, change the size limitation by modifying the

thrift_framed_transport_size_in_mb

property in the following locations: cassandra.yaml (in Cassandra) and conf/apigee/management- server/repository.properties

In addition, on each CS node:


By design intent the maximum allowed segment size is 50% of the configured commit_log_segment_size_in_mb. This is so Cassandra avoids writing segments with large amounts of empty space.

So for max 64MG the setting should be 64MG commitlog_segment_size_in_mb: 64

The setting to commitlog_segment_size_in_mb: {T}conf_cassandra_commitlog_segment_size_in_mb{/T} in cassandra.properties. conf_cassandra_commitlog_segment_size_in_mb=64

Hello,

Is there a java callout to S3 example available within the community?

Thank you,

Slobodanka

ask a new question, please.