It still may, just may, not be a bug.
1) Looking at your stored procedure definition, the last parameter is defined as a SMALLINT. According to Microsoft documentation (
source), SMALLINT is a 2 byte data type.
2) You pass in its place a -1 (or 1) and the GetType method in B4J returns java.lang.Integer. This is just a wrapper for Java's primitive integer type (
source). According to Oracle's documentation (
source) that is a 32bit (4 byte) value.
3) Looking at the source of jSQL (
here), CreateCallStatement uses the setObject method of Java's PreparedStatement Interface (
here). The method setObject is a generic version of the more detailed set* methods of PreparedStatement. So setObject sees an java.lang.Integer object, which then translates to a equivalent setInt method. And that may be the problem, since technically, this needs to be a call to setShort, since Java's primitive type short is a 16bit (2 byte) value, the same as SMALLINT.
In other words, I think the wrong type of parameter is being passed on to your stored procedure, but it's not really a bug in B4J/Java. So why don't you create a short variable in B4J, assign that variable the value you want to pass and see what happens.
' Just some code fragments
Dim OpComplete as Short
OpComplete = -1
sql1.CreateCallStatement(SQLStr, Array as Object(134273, 1, 0, '', OpComplete))