First time using Oracle, normally use SQLServer, and ran into a curious issue.
I was tearing my hair out with this problem, and trying random things and one happened to work.

So originally, I had only two parameters, and everything worked fine. I then wished to add a boolean value to allow for multiple paths in my stored proc. I test it out in my db environment, and there are no errors and I get back the data I expect. I then add the few lines in my java code to pull this data, and suddenly I get "`wrong number or types of parameters`" error. 

After trying several things, I simply change the type in Oracle from Boolean to Int, leaving the java code still as "`setBoolean(3, true)`" and everything works.

So my questions are: 

1) what am I sending with this setBoolean() on the java side, and what is Oracle getting?

2) what was it expecting before when it was of type "`Boolean`, and why is this not compatible with `setBoolean()`?"

3) Should I use Oracle type int with java setBoolean(), or some other combination such as Oracle Varchar, and setString(), when going for speed?

**Java:**

```
String jobquery =   "{call PKG_TEST.GET_PLAN_DATA(?,?,?)}";  
            CallableStatement callStmt = con.prepareCall(jobquery);

            callStmt.setString(1,"15105");
            callStmt.setString(2, "");
            callStmt.setBoolean(3, true);

```

**Oracle SP(previous):**

```
PROCEDURE GET_PLAN_DATA(
        NAME_N_IN IN VARCHAR2,
        TYPE_C_IN IN VARCHAR2 DEFAULT NULL,
        ONLY_RESTRICTIONS_IN IN BOOLEAN DEFAULT FALSE)

```

**Oracle changed to:**

```
 PROCEDURE GET_PLAN_DATA(
            NAME_N_IN IN VARCHAR2,
            TYPE_C_IN IN VARCHAR2 DEFAULT NULL,
            ONLY_RESTRICTIONS_IN IN INT DEFAULT 0)

```