Pessoal preciso pegar 3 variaveis q tao vindo na procedure e jogando em um Map mas ta dando pau de NullPointerException...
public HierarchicalMap pegaDadosTempoOracle() throws SQLException {
helper.prepareCall("{ " + context.getMessage(PACKAGE_ORACLE_DADOS) + " }");
ResultSet rs= null;
try {
helper.registerOutParameter(1, OracleTypes.CURSOR);
helper.execute();
rs= (ResultSet)helper.getObject(1);
if ( !rs.next()) {
context.getLogger().write(
Logger.ERROR,
PACKAGE_ORACLE_DADOS
+ " retornou cursor vazio");
throw new RuntimeException("Erro de comunicação");
}
HierarchicalMap mapa = new HierarchicalMap();
mapa.add("nome_usuario",rs.getString("nome_usuario"));
mapa.add("user_name",rs.getString("user_name"));
mapa.add("data_cadastro", dados.getString("data_cadastro"));
return mapa;
} catch (Exception e) {
context.getLogger().write(
Logger.ERROR,
PACKAGE_ORACLE_DADOS
+ " retornou dados inválidos");
throw new RuntimeException("Erro de comunicação");
} finally {
helper.close(rs);
}
}