4 Replies Latest reply: Jan 14, 2014 5:51 PM by JDeveloper Newbie ( RSS

    Error: java.sql.SQLException: Unsupported feature at oracle.jdbc.driver.OracleParameterMetaData.getParameterMode(OracleParameterMetaData.java:320)

    JDeveloper Newbie (

      Hi everyone,


      I have the following proof-of-concept method for using ParameterMetaData, but it bombs at the red statement below with the following error: java.sql.SQLException: Unsupported feature at oracle.jdbc.driver.OracleParameterMetaData.getParameterMode(OracleParameterMetaData.java:320).


      Here is the method which is in my ServicesAMImpl class:


          public void x() throws Exception {

              PreparedStatement pstmt =

                  getDBTransaction().createPreparedStatement("select * from dual where dummy = ?", 0);

              ParameterMetaData paramMetaData = null;

              paramMetaData = pstmt.getParameterMetaData();

              if (paramMetaData == null) {

                  System.out.println("db vendor does NOT support ParameterMetaData");

              } else {

                  System.out.println("db vendor supports ParameterMetaData");

                  // find out the number of dynamic parameters

                  int paramCount = paramMetaData.getParameterCount();

                  System.out.println("paramCount=" + paramCount);


                  for (int param = 1; param <= paramCount; param++) {

                      System.out.println("param number=" + param);

                      int paramMode = paramMetaData.getParameterMode(param);

                      System.out.println("param mode=" + paramMode);

                      if (paramMode == ParameterMetaData.parameterModeOut) {

                          System.out.println("the parameter's mode is OUT.");

                      } else if (paramMode == ParameterMetaData.parameterModeIn) {

                          System.out.println("the parameter's mode is IN.");

                      } else if (paramMode == ParameterMetaData.parameterModeInOut) {

                          System.out.println("the parameter's mode is INOUT.");

                      } else {

                          System.out.println("the mode of a parameter is unknown.");







      All of this Java development is in the context of ADF, so I was not sure if I should post here or in the Java Programming space.