Cannot access JAR and I get the following error

Not applicable

I get the following error

curl -X POST -F "file=@aws.jar" "https://api.enterprise.apigee.com/v1/organizations/xxx/apis/api-test/revisions/v1/resourcefiles?name..." -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" : []"

0 7 191
7 REPLIES 7

Hi @wilsonkompally,

That "v1" revision parameter doesn't look quite right. I think it should be "1" (or whatever revision number you are deploying to--it should be an integer).

Does it work if you change /revisions/v1/resourcefiles to /revisions/1/resourcefiles?

Will

Hi Witman,

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

Hi @wilsonkompally,

Sorry you're having a problem with this. You could try undeploying your proxy and redeploying it. If you can't undeploy it, then you can try a forced undeploy as explained here (be sure to use the query parameter "force=true". If that doesn't work, try deploying a new revision of the proxy and upload the jar to that revision.

To check if your curl command was correct, I tested uploading a jar for a proxy I created, and it worked okay for me.

Hi @wwitman

I tried undeploying proxy and redeploying it, also tried a forced undeploy and fimally tried deploying a new revision of the proxy and upload the jar to that revision.Still getting the same error

I'm curious -- were you ever able to deploy the proxy successfully? If so, did anything change between then and now?

@AMAR DEVEGOWDA would you be able to help?

As soon as I add the callout policy and jar it errors out and deosnt deploy

Okay thanks -- here are some more ideas for troubleshooting.

It sounds like there could be a configuration problem with the Java callout policy. Does your Java Callout policy refer to the class file you want to run and is that class file in the Jar? Be sure your Java callout is configured correctly and points to this class file. The basic steps for creating and deploying a basic Java callout proxy are described in this tutorial topic. Maybe double-checking these steps will help. Or, try deploying the simple example and get it working, and then see if you can then get your jar to deploy. Maybe this will help you troubleshoot.

Also, double-check that your JAR isn't missing something important, as explained here.

By the way, I can generate the same error if I try to deploy a Java callout that doesn't refer to a class in the Jar (i.e., I simply misspell the class file name). This indicates a configuration problem but I'm not sure exactly what's causing your deployment issue.