Java Call out error in Hybrid "WHITESPACE"

ven
Bronze 1
Bronze 1

Hi,

We are planning to convert a legacy code, written in java, into a jar and use it in javacall out in Apigee. While the code successfully works locally when we use the Jar file in javacall out we get the following error. We noticed that the java code is getting called, but the failure is happening at one statement which calls another class. This class primarily uses String functions and char. I made sure we use same java version to compile the classes and generate the jar as the one I have in the gateway, still the same issue. Any pointers on what could be the cause or if this is something seen commonly? This is my first java callout so wondering if I am missing any foundational element here.

{

    "fault": {

        "faultstring": "Failed to execute JavaCallout. WHITESPACE",

        "detail": {

            "errorcode": "steps.javacallout.ExecutionError"

        }

    }

0 3 60
3 REPLIES 3

Enable message processor debug logging and validate. (that's how we do on-prem)..

Side note:

May be re-factor the code to show what line it is failing..In simple terms with above error message it is hard to triage.

Ref:

https://docs.apigee.com/api-platform/samples/cookbook/how-handle-java-callout-errors

 

ven
Bronze 1
Bronze 1

An update on this issue. We looked at the logs printed on to kubernetes pods (which are synched to GCP) and noticed that the latest version of the class used no longer supports few functions used by one of the classes in the jar. Attaching specific version of class/jar as a resource in the shared flow helped us resolve the issue.

ahhhhhhh nice find. 

Thanks for the followup.