How to add JAR file in API Proxy

Not applicable

Hello,

I am trying to add a jar file in my API Proxy. I selected JAR option and added .jar file to the flow and I am trying to upload that file using the following code but I am getting error. This is what I am doing. if anyone has tried this before please let me know what is wrong?

I am trying:

curl -v "https://api.enterprise.apigee.com/v1/organizations/xxx/apis/api-test/revisions/v1/resourcefiles?name=test.jar&type=java" -u xxx:xxx

but I get this error

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}"code" : "messaging.config.beans.RevisionInvalid","message" : "Invalid Revision","contexts" : []"

I also don't know if I need to add a resourcefile which has the jar file details or I should add a Java Call out. Currently I am trying to call this jar file using Java CallOut.

Thanks,

Wilson

0 5 848
5 REPLIES 5

Not applicable

Can someone help me on this issue? please

Can you check this answer by @Dino . Hope will help you.

Didn't help.. but, thanks for the reply

The error says: ""Invalid Revision"". In your API calls you have revision "v1", which should be just a number without the "v". Can you try:

curl -v "https://api.enterprise.apigee.com/v1/organizations/xxx/apis/api-test/revisions/1/resourcefiles?name=test.jar&type=java" -u xxx:xxx

I changed it to /revisions/1/resourcefiles.. but, now I get a different error when I try to deploy the proxy.

Error in deployment for environment dev.The revision is deployed, but traffic cannot flow. com.apigee.kernel.exceptions.spi.UncheckedException{ code = application.bootstrap.FailedToConfigure, message = Configuration failed, associated contexts = []}

Thanks,

Wilson