Gateway Failing With Pl/SQL Numeric Or Value Error: character string buffer too small (Doc ID 2080351.1)

Last updated on DECEMBER 02, 2016

Applies to:

Oracle API Gateway - Version 11.1.2 and later
Information in this document applies to any platform.

Symptoms

On an upgrade of the Gateway to 11.1.2.3, failures in the Gateway are experienced when calling pl/sql procedures which use IN/OUT parameters.
If the attribute specified as the IN/OUT parameter has not previously been set to a value in the Gateway then, immediately following the procedure call, the Gateway errors out with the below message:


com.vordel.common.VordelException: Error performing the query [BEGIN
s_gateway.test_gateway(?);
END;]: SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 2
at com.vordel.common.db.WildcardedCallableStatement.execute(WildcardedCallableStatement.java:127)
at com.vordel.circuit.attribute.AttributeExtractDbProcessor.getAttributes(AttributeExtractDbProcessor.java:159)
at com.vordel.circuit.attribute.AttributeExtractDbProcessor.getAttributes(AttributeExtractDbProcessor.java:145)
at com.vordel.circuit.attribute.AttributeExtractBaseProcessor.invoke(AttributeExtractBaseProcessor.java:149)
at com.vordel.circuit.attribute.AttributeExtractDbProcessor.invoke(AttributeExtractDbProcessor.java:80)
at com.vordel.circuit.InvocationEngine.invokeFilter(InvocationEngine.java:150)
at com.vordel.circuit.InvocationEngine.invokeCircuit(InvocationEngine.java:42)
at com.vordel.circuit.InvocationEngine.recordCircuitInvocation(InvocationEngine.java:276)
at com.vordel.circuit.InvocationEngine.processMessage(InvocationEngine.java:239)
at com.vordel.circuit.SyntheticCircuitChainProcessor.invoke(SyntheticCircuitChainProcessor.java:64)
at com.vordel.dwe.http.HTTPPlugin.processRequest(HTTPPlugin.java:351)
at com.vordel.dwe.http.HTTPPlugin.invokeDispose(HTTPPlugin.java:359)
at com.vordel.dwe.http.HTTPPlugin.invoke(HTTPPlugin.java:135)

 

 ### Steps required to reproduce the problem ###
Test case created in the attached files:
- s_gateway_ora.pks/pkb contains the definition of a pl/sql procedure(test_gateway) which has a single IN/OUT parameter and returns a fixed value.
- FOPS_api_deployment.xml is the Gateway deployment file. This contains a policy called 'Version Number'.
This sets an attribute called test_refno which is then specified as the IN/OUT parameter to the pl/sql procedure call made in the 'write to database' filter.
When this filter is executed, the procedure successfully completes but the Gateway generates the above error.
If the test_refno attribute is set to a value, (providing that it is higher than 9 !!!), prior to executing the 'write to database' filter then the Gateway processes the request without generating any errors.
The 'Version Number' policy can be called via the url http://<server><port>/version .

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms