title: SimpleJdbcCall NullPointerException on Firebird DB
body: <p>I have a problem with calling a stored procedure on Firebird. My procedure has one parameter (UID) and returns one value ID.</p>
  
  <pre><code>...
  JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
  // sp declaration
  SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate)
        .withProcedureName("SP_NEWRECORD").declareParameters(
         new SqlParameter("UID", Types.INTEGER),
         new SqlOutParameter("NEWID", Types.INTEGER));
  Map&lt;String, Object&gt; in = new HashMap&lt;String, Object&gt;();
  in.put("UID", uid);
  in.put("NEWID", 0);
  
  try {
  Map&lt;String, Object&gt; out = jdbcCall.execute(in); //here throws Exception
      last_inserted = Integer.parseInt(String.valueOf(out.get("NEWID")));
  } catch (Exception ex) {
      ex.printStackTrace();
  } finally {
      System.out.println("createRecord result id=" + last_inserted);
  }
  // return id of inserted record
  return last_inserted;
  </code></pre>
  
  <p>Catalina out</p>
  
  <pre><code>java.lang.NullPointerException
  at org.firebirdsql.jdbc.AbstractResultSet.getRow(AbstractResultSet.java:1307)
  at org.firebirdsql.jdbc.AbstractCallableStatement.assertHasData(AbstractCallableStatement.java:998)
  at org.firebirdsql.jdbc.AbstractCallableStatement.getObject(AbstractCallableStatement.java:773)
  at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.getObject(NewProxyCallableStatement.java:675)
  at org.springframework.jdbc.core.JdbcTemplate.extractOutputParameters(JdbcTemplate.java:1168)
  </code></pre>
  
  <p>code of SP is very simple, creates new record in table and returns ID of inserted record</p>
  
  <pre><code>ALTER PROCEDURE SP_NEWRECORD (UID integer)
  RETURNS (NEWID integer)
  AS
  declare variable ID integer;
  begin
    ID=GEN_ID(gen_myrecords_id,1);
    insert into myrecords (id,uid)
    values (:id,:uid);
    newid=ID;
  end
  </code></pre>