Obtenir la SQLException java.sql.SQLException: Jeu De Résultats.prochain n'a pas été appelé

Je suis le développement d'un Webservice pour le moment. Je pensais que j'étais prêt à sortir mon premier productif version, mais je reçois une SQLException qui n'a pas de sens pour moi. Je suis à l'encontre du développement d'une db Oracle btw.
Permettez-moi de vous donner mon code au premier abord:

try{
    variable = DoQuery("SELECT KEY FROM TABLE WHERE KEY IN ('KEY1', 'KEY2') AND ROWNUM = 1").getString("HANDLE");
}catch(SQLException e){
    return "Wasn't able to gather key: " + e.toString() + " - " + e.getSQLState();
}

La méthode "DoQuery":

private ResultSet DoQuery(String sqlString){
    Statement sqlHandleStatement;
    try {
        sqlHandleStatement = getStatement();
        return sqlHandleStatement.executeQuery(sqlString);
    } catch (SQLException e) {
        e.printStackTrace();
    }
    return null;
}

La méthode "getStatement":

private Statement getStatement() throws SQLException {
    DataSource dataSource = null;
    try {
        dataSource = (DataSource) JNDIUtils.getInitialContext().lookup(JNDIUtils.DEFAULT_DATASOURCE);
    } catch (NamingException e) {
        e.printStackTrace();
    }
    Connection connection;

    connection = dataSource.getConnection();
    Statement statement;
    statement = connection.createStatement();
    return statement;
}   

Cependant, si j'exécute ma requête SOAP, je reçois en retour:

<SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
      <ns2:getNextRMANumberResponse xmlns:ns2="http://webservice.epm.com/">
         <return>Wasn't able to gather key: java.sql.SQLException: ResultSet.next was not called - 99999</return>
      </ns2:getNextRMANumberResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Message d'erreur: "N'était pas en mesure de recueillir clés: java.sql.SQLException: Jeu De Résultats.prochain n'a pas été appelé à 99999" (à comparer avec le premier extrait de code donné dans ce post)

Qu'est-ce que cela signifie? Je n'ai vraiment pas pourquoi je devrais exécuter "jeu de résultats.prochaine"?!

Merci d'avance!

OriginalL'auteur OddDev | 2015-03-03